MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / clean_env

Function clean_env

tools/system_libs.py:89–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88
89def clean_env():
90 # building system libraries and ports should be hermetic in that it is not
91 # affected by things like EMCC_CFLAGS which the user may have set.
92 # At least one port also uses autoconf (harfbuzz) so we also need to clear
93 # CFLAGS/LDFLAGS which we don't want to affect the inner call to configure.
94 safe_env = os.environ.copy()
95 for opt in ['CPATH', 'C_INCLUDE_PATH', 'CPLUS_INCLUDE_PATH', 'OBJC_INCLUDE_PATH',
96 'CFLAGS', 'CXXFLAGS', 'LDFLAGS',
97 'EMCC_CFLAGS',
98 'EMCC_AUTODEBUG',
99 'EMCC_FORCE_STDLIBS',
100 'EMCC_ONLY_FORCED_STDLIBS',
101 'EMMAKEN_JUST_CONFIGURE']:
102 if opt in safe_env:
103 del safe_env[opt]
104 return safe_env
105
106
107def run_build_commands(commands, num_inputs, cwd=None):

Callers 2

run_build_commandsFunction · 0.85
run_ninjaFunction · 0.85

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected