Skip to content

Fix incorrect string format in js build script #26374

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions platforms/js/build_js.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,12 @@ def build_loader(self):
parser.add_argument('--cmake_option', action='append', help="Append CMake options")
# Use flag --build_flags="-s USE_PTHREADS=0 -Os" for one and more arguments as in the example
parser.add_argument('--build_flags', help="Append Emscripten build options")
parser.add_argument('--build_wasm_intrin_test', default=False, action="store_true", help="Build WASM intrin tests")
parser.add_argument('--build_wasm_intrin_test', action="store_true", help="Build WASM intrin tests")
# Write a path to modify file like argument of this flag
parser.add_argument('--config', help="Specify configuration file with own list of exported into JS functions")
parser.add_argument('--webnn', action="store_true", help="Enable WebNN Backend")

transformed_args = ["--cmake_option=%s".format(arg) if arg[:2] == "-D" else arg for arg in sys.argv[1:]]
transformed_args = ["--cmake_option={}".format(arg) if arg[:2] == "-D" else arg for arg in sys.argv[1:]]
args = parser.parse_args(transformed_args)

log.debug("Args: %s", args)
Expand Down
Loading