-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Web: Workaround Emscripten 3.1.42+ LTO regression #81340
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -118,6 +118,11 @@ def configure(env: "Environment"): | |
else: | ||
env.Append(CCFLAGS=["-flto"]) | ||
env.Append(LINKFLAGS=["-flto"]) | ||
# Workaround https://github.com/emscripten-core/emscripten/issues/19781. | ||
cc_version = get_compiler_version(env) | ||
cc_semver = (int(cc_version["major"]), int(cc_version["minor"]), int(cc_version["patch"])) | ||
if cc_semver >= (3, 1, 42): | ||
Comment on lines
+122
to
+124
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'll refactor this logic in #80719 after this is merged. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just noticed in the Edit: That can't be done for 4.x, there's more than just (major, minor, patch) in the dict. |
||
env.Append(LINKFLAGS=["-Wl,-u,scalbnf"]) | ||
|
||
# Sanitizers | ||
if env["use_ubsan"]: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't strictly needed, just a drive-by change as Ubuntu 20.04 will be EOL'ed by GH Actions eventually, and we have no reason to stick to the old version for Web builds.