Skip to content

Emscripten target specs are conditional on the host platform #38724

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

Closed
brson opened this issue Dec 30, 2016 · 2 comments
Closed

Emscripten target specs are conditional on the host platform #38724

brson opened this issue Dec 30, 2016 · 2 comments
Labels
C-bug Category: This is a bug. O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! O-wasm Target: WASM (WebAssembly), http://webassembly.org/

Comments

@brson
Copy link
Contributor

brson commented Dec 30, 2016

In this PR, to make emscripten work on windows, the target specs are conditionalized to use emcc.bat as the linker, only on windows hosts.

In practice this should be perfectly fine, but I don't think it's correct for the target spec to vary like that and there should be some way to express the spec statically that works on both platforms.`

cc @schulzch

@brson brson added O-asmjs Target: asm.js - http://asmjs.org/ O-wasm Target: WASM (WebAssembly), http://webassembly.org/ I-wrong labels Dec 30, 2016
@schulzch
Copy link
Contributor

schulzch commented Jan 4, 2017

Emscripten provides three files per command, e.g.:

  • emcc python 2.x and 3.x wrapper which invokes emcc.py using python 2.x
  • emcc.bat invokes emcc.py using python
  • emcc.pycontains the actual code

I think having a host platform dependent switch is not wrong, because that is how script commands are usually wrapped on windows - the Node.js package manager npm creates wrapper *.cmd files transparently on windows.

The only other solution I can think of would be to enable shell expansion, i.e., to have windows append *.exe, *.cmd, *.bat, etc., which could imply a performance penalty (?).

@Mark-Simulacrum Mark-Simulacrum added C-bug Category: This is a bug. and removed I-wrong labels Jul 26, 2017
@alexcrichton
Copy link
Member

Nowadays we even have more special treatment of emcc.bat, so I think this may just be a necessary evil for now :(

@workingjubilee workingjubilee added the O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! O-wasm Target: WASM (WebAssembly), http://webassembly.org/
Projects
None yet
Development

No branches or pull requests

5 participants