-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Define __FILE__ as an empty string in release mode #23196
base: main
Are you sure you want to change the base?
Conversation
This removes all absolute and relative file paths generated by `__FILE__` macro from release build, making the release build reproducible and the results of code size tests consistent. Without `-Wno-builtin-macro-redefined`, the build errors out: ```console In file included from <built-in>:365: <command line>:3:9: error: redefining builtin macro [-Werror,-Wbuiltin-macro-redefined] 3 | #define __FILE__ "" | ^ 1 error generated. ``` The more detailed description on why this is necessary is in emscripten-core#23195.
This also needs to update the rebaseline results, but somehow running |
I have the same problem, haven't been able to figure out why. |
@hoodmane It looks that our LLVM roller was pinned at a specific version to diagnose another potential bug: So if you are compiling LLVM from source, I think you can set it to 322eb1a92e6d4266184060346616fa0dbe39e731 for the moment to avoid this problem. |
Or just use |
I am using |
Can you try with |
If you have installed with Can you share what revision of |
Okay I'll try that out on one of the commits that rebaselined code size. |
Okay, it seems to be working for me now. Not sure what I was doing wrong before. |
Your recent change #23135 actually caused main to become out-of-date. So I just landed 91f9825 which updates it again. At some point we will hopefully make it really easy to update these expectation along with each PR that lands: #23146 |
This removes all absolute and relative file paths generated by
__FILE__
macro from release build, making the release build reproducible and the results of code size tests consistent.Without
-Wno-builtin-macro-redefined
, the build errors out:The more detailed description on why this is necessary is in #23195.
Fixes #23195.