-
Notifications
You must be signed in to change notification settings - Fork 80
Cleanup fix for global initialization #93
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
Conversation
Removing the linker script hack makes many tests fail because they can't find some symbols:
Is it because I do a different name mangling? |
You don't use |
Some symbols are not currently supported in libgccjit so I replace them. Hopefully, that's an easy fix in libgccjit ;) . Thanks for confirming my intuition! |
Try |
@@ -171,7 +171,7 @@ git checkout src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice.rs | |||
git checkout src/test/ui/type-alias-impl-trait/auxiliary/cross_crate_ice2.rs | |||
rm src/test/ui/llvm-asm/llvm-asm-in-out-operand.rs || true # TODO(antoyo): Enable back this test if I ever implement the llvm_asm! macro. | |||
|
|||
RUSTC_ARGS="-Zpanic-abort-tests -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot -Cpanic=abort" | |||
RUSTC_ARGS="-Zpanic-abort-tests -Zsymbol-mangling-version=v0 -Zcodegen-backend="$(pwd)"/../target/"$CHANNEL"/librustc_codegen_gcc."$dylib_ext" --sysroot "$(pwd)"/../build_sysroot/sysroot -Cpanic=abort" |
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.
Looks like this didn't affect sysroot building.
176fa2b
to
7280758
Compare
2d649b8
to
4f5761b
Compare
@dkm Can you tell my if the switch to v0 symbol mangling is causing any issues for GodBolt? If so, I'll add support of the missing symbols in libgccjit to allow the usage of the previous symbol mangling (I'm just not sure if some of those symbols are unavailable on some targets). |
Not sure exactly what I should look for... ? Currently, on godbolt, only x86 is used, haven't tried to target another arch... Would be a good idea ! |
The name mangling is what turns a rust path like I was asking because I wondered if that would cause issues with GodBolt. I'm not sure if the tools (like |
Ok, I'll check that :) |
I think the v0 symbol mangling scheme will need to enabled on godbolt too. |
After a small test, seems that rustfilt is fresh enough on compiler-explorer to correctly handle v0 mangling. I could check with rustc_cg_gcc as I can give https://godbolt.org/z/Tqf5dPvaY Do you want to have the v0 mangling forced on compiler-explorer ? I can add the note: in the above example, there's the |
I'm not sure I understand this output, but shouldn't the name in the bottom-right window be unmangled? Yes, you will have to use this mangling (with latest cg_gcc) because I removed the linker script hack, so the code won't link. I can fix the previous mangling if you would prefer to keep it. I believe it is expected to have a suffix with the crate name. |
On October 1, 2021 9:56:41 PM UTC, antoyo ***@***.***> wrote:
I'm not sure I understand this output, but shouldn't the name in the bottom-right window be unmangled?
No, this is the output without the option for using demangling, sorry this was not clear. I added it to show the symbols and be able to see that it's really using v0.
Yes, you will have to use this mangling (with latest cg_gcc) because I removed the linker script hack, so the code won't link. I can fix the previous mangling if you would prefer to keep it.
There's currently no linking possible on compiler explorer because the result of cg_gcc were too big last time I checked... So this should not be an issue... For now... But I can force v0 anyway if that's the future :)
I believe it is expected to have a suffix with the crate name.
Ok
|
No description provided.