mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 16:32:59 +00:00
Bug 1457295 Trick clang+lld+lto into ordering NSModules correctly also r=glandium
MozReview-Commit-ID: 4JgOOVhA3YU --HG-- extra : rebase_source : e99d6fdf715064339b01935eedc213bbe98a3deb
This commit is contained in:
parent
61f0eee6f3
commit
faac718e99
@ -9,6 +9,11 @@
|
|||||||
# pragma section(".kPStaticModules$Z", read)
|
# pragma section(".kPStaticModules$Z", read)
|
||||||
# undef NSMODULE_SECTION
|
# undef NSMODULE_SECTION
|
||||||
# define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$Z"), dllexport)
|
# define NSMODULE_SECTION __declspec(allocate(".kPStaticModules$Z"), dllexport)
|
||||||
|
#elif MOZ_LTO
|
||||||
|
/* Clang+lld with LTO does not order modules correctly either, but fortunately
|
||||||
|
* the same trick works. */
|
||||||
|
# undef NSMODULE_SECTION
|
||||||
|
# define NSMODULE_SECTION __attribute__((section(".kPStaticModules$Z"), visibility("default")))
|
||||||
#endif
|
#endif
|
||||||
/* This could be null, but this needs a dummy value to ensure it actually ends
|
/* This could be null, but this needs a dummy value to ensure it actually ends
|
||||||
* up in the same section as other NSMODULE_DEFNs, instead of being moved to a
|
* up in the same section as other NSMODULE_DEFNs, instead of being moved to a
|
||||||
|
Loading…
Reference in New Issue
Block a user