Skip to content

Clean up WASM_BACKEND usage in emcc.py #11967

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 5 commits into from
Aug 19, 2020
Merged

Clean up WASM_BACKEND usage in emcc.py #11967

merged 5 commits into from
Aug 19, 2020

Conversation

kripken
Copy link
Member

@kripken kripken commented Aug 19, 2020

See #11860

Btw, just to confirm, add_dylink_section seems no longer used - I guess the
wasm backend emits that section for us? (do we not need to update it?)

@kripken kripken requested a review from sbc100 August 19, 2020 18:40
tools/shared.py Outdated
@@ -1372,61 +1371,6 @@ def add_emscripten_metadata(js_file, wasm_file):
f.write(contents)
f.write(orig[8:])

@staticmethod
def add_dylink_section(wasm_file, needed_dynlibs):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have a PR in progress that modifies this method to work with the wasm backend. So can you maybe leave it in for now?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I'll restore add_dylink_section.

@@ -2876,12 +2723,6 @@ def do_binaryen(target, asm_target, options, memfile, wasm_binary_target,
building.save_intermediate(wasm_binary_target, 'pre-ctors.wasm')
building.eval_ctors(final, wasm_binary_target, binaryen_bin, debug_info=intermediate_debug_info)

# after generating the wasm, do some final operations
if shared.Settings.SIDE_MODULE and not shared.Settings.WASM_BACKEND:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you leave this in but maybe commented or with a TODO?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, done.

if shared.Settings.SIDE_MODULE and not shared.Settings.WASM_BACKEND:
shared.WebAssembly.add_dylink_section(wasm_binary_target, shared.Settings.RUNTIME_LINKED_LIBS)
if not DEBUG:
os.unlink(asm_target) # we don't need the asm.js, it can just confuse
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can remove these last two lines though.

# We allow this error to be supressed by the environment so that we can run the test
# suite against fastcomp for the time being.
# See: https://github.com/emscripten-core/emscripten/issues/11319
if not shared.Settings.WASM_BACKEND and 'EMCC_ALLOW_FASTCOMP' not in os.environ:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We still want this right?

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, why would we want to look at EMCC_ALLOW_FASTCOMP? Fastcomp won't work with all the removed code anyhow, and we aren't running those tests.

Or do you mean we want an error for trying to use fastcomp? I don't think it's possible to get to this code location. We error anyhow on trying to set WASM_BACKEND - we always have, before this PR, it's autodetected. And we've even removed that autodetection code?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess I mean we still need the error case... but you can drop the EMCC_ALLOW_FASTCOMP part

@kripken kripken merged commit 30f86cc into master Aug 19, 2020
@kripken kripken deleted the no-WB-emcc.py branch August 19, 2020 21:47
sbc100 added a commit that referenced this pull request Mar 23, 2021
This option was already essentially ignored is the value of
options.llvm_opts was written but never read by the compiler driver.

The last use of thie option was removed back in #11967 but this went
unnoticed.
sbc100 added a commit that referenced this pull request Mar 23, 2021
This option was already essentially ignored is the value of
options.llvm_opts was written but never read by the compiler driver.

The last use of thie option was removed back in #11967 but this went
unnoticed.
sbc100 added a commit that referenced this pull request Mar 24, 2021
This option was already essentially ignored is the value of
`options.llvm_opts` was written but never read by the compiler driver.

The last use of this option was removed back in #11967 but this went
unnoticed.
sbc100 added a commit that referenced this pull request Mar 24, 2021
This option was already essentially ignored is the value of
`options.llvm_opts` was written but never read by the compiler driver.

The last use of this option was removed back in #11967 but this went
unnoticed.
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.

2 participants