Define __FILE__ as an empty string in release mode#23196
Define __FILE__ as an empty string in release mode#23196aheejin wants to merge 1 commit intoemscripten-core:mainfrom
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.