Skip to content

Commit

Permalink
build: set os configuration parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kgryte committed Sep 10, 2024
1 parent c7c105a commit 1d07426
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tools/scripts/compile_wasm
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#
# Environment Variables:
#
# OS Host operating system. Default: `linux`.
# NODE Command for running Node.js. Default: `node`.
# NODE_PATH Path for resolving node modules.
# EMCCC_COMPILER Emscripten C compiler. Default: `emcc`.
Expand Down Expand Up @@ -123,7 +122,7 @@ resolve_includes() {
local script
local opts

opts="{'wasm':true}"
opts="{'wasm':true,'os':''}"

# Generate the script for resolving external include directories:
script='"'"var path = require('path'); var arr = require('@stdlib/utils/library-manifest')(path.join('$1','manifest.json'),${opts},{'basedir':'$1','paths':'posix'}).include; var str = ''; for (var i = 0; i < arr.length; i++){var p = path.resolve('$1', arr[i]); if (p.indexOf('$1') === 0) {continue;}; str += '-I '+p+' ';}; console.log(str.substring(0, str.length-1));"'"'
Expand All @@ -142,7 +141,7 @@ resolve_source_files() {
local script
local opts

opts="{'wasm':true}"
opts="{'wasm':true,'os':''}"

# Generate the script for resolving external source files:
script='"'"var path = require('path'); var arr = require('@stdlib/utils/library-manifest')(path.join('$1','manifest.json'),${opts},{'basedir':'$1','paths':'posix'}).src; var str = ''; for (var i = 0; i < arr.length; i++){var p = path.resolve('$1', arr[i]); if (p.indexOf('$1') === 0) {continue;}; str += p+' ';}; console.log(str.substring(0, str.length-1));"'"'
Expand All @@ -161,7 +160,7 @@ resolve_libraries() {
local script
local opts

opts="{'wasm':true}"
opts="{'wasm':true,'os':''}"

# Generate the script for resolving libraries:
script='"'"var path = require('path'); var arr = require('@stdlib/utils/library-manifest')(path.join('$1','manifest.json'),${opts},{'basedir':'$1','paths':'posix'}).libraries; var str = ''; for (var i = 0; i < arr.length; i++){str += arr[i]+' ';}; console.log(str.substring(0, str.length-1));"'"'
Expand All @@ -180,7 +179,7 @@ resolve_libpaths() {
local script
local opts

opts="{'wasm':true}"
opts="{'wasm':true,'os':''}"

# Generate the script for resolving library paths:
script='"'"var path = require('path'); var arr = require('@stdlib/utils/library-manifest')(path.join('$1','manifest.json'),${opts},{'basedir':'$1','paths':'posix'}).libpath; var str = ''; for (var i = 0; i < arr.length; i++){var p = path.resolve('$1', arr[i]); str += '-L '+p+' ';}; console.log(str.substring(0, str.length-1));"'"'
Expand Down

0 comments on commit 1d07426

Please sign in to comment.