Skip to content

Commit

Permalink
Define NODE_JS_EXECUTABLE based on an env var (#190)
Browse files Browse the repository at this point in the history
* Define NODE_JS_EXECUTABLE based on an env var

This is necessary for halide/Halide#6356 to land -- if we are building/testing wasm, we need to set NODE_JS_EXECUTABLE properly; this patch does so based on an env var ('HALIDE_NODE_JS_PATH') which is assumed to be defined on the relevant wokers.

* Update master.cfg
  • Loading branch information
steven-johnson authored Oct 27, 2021
1 parent cad16c9 commit 8391a66
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion master/master.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,11 @@ def get_halide_cmake_definitions(builder_type, halide_target='host'):
if builder_type.os == 'windows':
cmake_definitions['CMAKE_TOOLCHAIN_FILE'] = Interpolate('%(prop:VCPKG_ROOT)s/scripts/buildsystems/vcpkg.cmake')

# TODO: HALIDE_NODE_JS_PATH is only necessary until EMSDK updates their built-in version of Node
# to v16.13+; when that is done, remove this definition.
if builder_type.handles_wasm():
cmake_definitions['NODE_JS_EXECUTABLE'] = Property('HALIDE_NODE_JS_PATH')

return cmake_definitions


Expand Down Expand Up @@ -703,8 +708,13 @@ def add_env_setup_step(factory, builder_type, enable_ccache=False):
'LD': ld,
}

# TODO: HALIDE_NODE_JS_PATH is only necessary until EMSDK updates their built-in version of Node
# to v16.13+; when that is done, remove HALIDE_NODE_JS_PATH here and on the workers.
factory.addStep(SetPropertiesFromEnv(name='Read worker environment',
variables=['VCPKG_ROOT', 'LD_LIBRARY_PATH', 'HL_HEXAGON_TOOLS']))
variables=['VCPKG_ROOT',
'LD_LIBRARY_PATH',
'HL_HEXAGON_TOOLS',
'HALIDE_NODE_JS_PATH']))

vcpkg_root = Property('VCPKG_ROOT', default=None)

Expand Down

0 comments on commit 8391a66

Please sign in to comment.