зеркало из https://github.com/mozilla/gecko-dev.git
a66584728f
A previous patch defined `_LIBCPP_HIDE_FROM_ABI` to the empty string. This definition worked for normal (opt/debug) builds, but PGO-instrumented builds fell over with some linker errors. A closer look at the definition of `_LIBCPP_HIDE_FROM_ABI`: ``` #ifndef _LIBCPP_HIDE_FROM_ABI_PER_TU # ifndef _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT # define _LIBCPP_HIDE_FROM_ABI_PER_TU 0 # else # define _LIBCPP_HIDE_FROM_ABI_PER_TU 1 # endif #endif #ifndef _LIBCPP_HIDE_FROM_ABI # if _LIBCPP_HIDE_FROM_ABI_PER_TU # define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_INTERNAL_LINKAGE # else # define _LIBCPP_HIDE_FROM_ABI _LIBCPP_HIDDEN _LIBCPP_EXCLUDE_FROM_EXPLICIT_INSTANTIATION # endif #endif ``` says that there are two macros involved there: one to set hidden visibility (which we don't want), and another to exclude the function definition from explicit instantiation. The semantics of this are not obvious (the clang documentation only documents this attribute in terms of C++ templates; the particular case we're interested in sets the attribute on normal function definitions). But roughly, what this does is that it forces the compiler to see that an equivalent function definition is provided external to the compilation unit, so it doesn't have to keep the annotated function definition around. Differential Revision: https://phabricator.services.mozilla.com/D45073 --HG-- extra : moz-landing-system : lando |
||
---|---|---|
.. | ||
android-ndk.configure | ||
android-sdk.configure | ||
arm.configure | ||
bindgen.configure | ||
checks.configure | ||
compile-checks.configure | ||
compilers-util.configure | ||
flags.configure | ||
headers.configure | ||
init.configure | ||
java.configure | ||
keyfiles.configure | ||
lto-pgo.configure | ||
memory.configure | ||
node.configure | ||
old.configure | ||
pkg.configure | ||
rust.configure | ||
toolchain.configure | ||
tup.configure | ||
util.configure | ||
warnings.configure | ||
windows.configure |