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

Function get_building_env

tools/building.py:66–88  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

64
65
66def get_building_env():
67 cache.ensure()
68 env = os.environ.copy()
69 # point CC etc. to the em* tools.
70 env['CC'] = EMCC
71 env['CXX'] = EMXX
72 env['AR'] = EMAR
73 env['LD'] = EMCC
74 env['NM'] = LLVM_NM
75 env['LDSHARED'] = f'{EMCC} -shared'
76 env['RANLIB'] = EMRANLIB
77 env['EMSCRIPTEN_TOOLS'] = path_from_root('tools')
78 env['HOST_CC'] = CLANG_CC
79 env['HOST_CXX'] = CLANG_CXX
80 env['HOST_CFLAGS'] = '-W' # if set to nothing, CFLAGS is used, which we don't want
81 env['HOST_CXXFLAGS'] = '-W' # if set to nothing, CXXFLAGS is used, which we don't want
82 env['PKG_CONFIG_LIBDIR'] = cache.get_sysroot_dir('local/lib/pkgconfig') + os.path.pathsep + cache.get_sysroot_dir('lib/pkgconfig')
83 env['PKG_CONFIG_PATH'] = os.environ.get('EM_PKG_CONFIG_PATH', '')
84 env['EMSCRIPTEN'] = path_from_root()
85 env['PATH'] = cache.get_sysroot_dir('bin') + os.pathsep + env['PATH']
86 env['ACLOCAL_PATH'] = cache.get_sysroot_dir('share/aclocal')
87 env['CROSS_COMPILE'] = path_from_root('em') # produces /path/to/emscripten/em , which then can have 'cc', 'ar', etc appended to it
88 return env
89
90
91def llvm_backend_args():

Callers 1

test_emscons_envMethod · 0.90

Calls 3

path_from_rootFunction · 0.85
getMethod · 0.65
copyMethod · 0.45

Tested by 1

test_emscons_envMethod · 0.72