Skip to content
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

Allow wasm object files as input, even when WASM_OBJECT_FILES=0 is set #8600

Merged
merged 1 commit into from
May 16, 2019

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented May 13, 2019

Specifying WASM_OBJECT_FILES=0 on the link line is current needed if
one want to select LTO libraries. However this should not exclude
some input being wasm object files.

Fixes #8599

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the opposite also true - can we mix wasm and bitcode files with WASM_OBJECT_FILES=1?

Please add some mention of this on the WASM_OBJECT_FILES section in src/settings.js (not sure where's a better place).

Please add a test here.

@sbc100
Copy link
Collaborator Author

sbc100 commented May 14, 2019

Yes. WASM_OBJECT_FILES at compile time means "please output a wasm object file". WASM_OBJECT_FILES at link time means "use libraries in the form of wasm object files". In the long run both of these should be replaced by some kind of LTO flag.

@sbc100
Copy link
Collaborator Author

sbc100 commented May 15, 2019

While fixing this I found a bug in our LTO implementation. Fixed upstream: https://reviews.llvm.org/D61924.

Will need to wait for the waterfall to get a clean build of that before this change can lang I think.

Specifying WASM_OBJECT_FILES=0 on the link line is current needed if
one want to select LTO libraries.  However this should not exclude
some input being wasm object files.

Fixes #8599
@sbc100 sbc100 merged commit fecd944 into incoming May 16, 2019
@sbc100 sbc100 deleted the allow_object_input branch May 16, 2019 01:19
VirtualTim pushed a commit to VirtualTim/emscripten that referenced this pull request May 21, 2019
emscripten-core#8600)

Specifying WASM_OBJECT_FILES=0 on the link line is current needed if
one want to select LTO libraries.  However this should not exclude
some input being wasm object files.

Fixes emscripten-core#8599
VirtualTim added a commit to VirtualTim/emscripten that referenced this pull request May 23, 2019
VirtualTim added a commit to VirtualTim/emscripten that referenced this pull request May 23, 2019
belraquib pushed a commit to belraquib/emscripten that referenced this pull request Dec 23, 2020
emscripten-core#8600)

Specifying WASM_OBJECT_FILES=0 on the link line is current needed if
one want to select LTO libraries.  However this should not exclude
some input being wasm object files.

Fixes emscripten-core#8599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LTO of mixed wasm & bitcode files not working when linking with WASM_OBJECT_FILES=0
4 participants