-
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
Fixing linker warnings with Arm Compiler toolchain (C++) #6707
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
@googlebot I signed it! |
Keil (ARMCC) has support of This change can break user code if someone uses this
|
I don't think there's going to be a ton of people relying on In fact, I'd love to remove it all-together, and instead rely on an (inline) function of the same. If you see the comment above it (and similarly at the end of |
@MatthiasHertel80 Would you like to make a PR removing this? |
This should be closed by #7046. Let me know if it is or not. |
The Arm Compiler toolchains will issue warnings about multiple definitions of flatbuffer_version_string, despite the weak attribute.
Warning: L6439W: Multiply defined Global Symbol flatbuffers::flatbuffer_version_string defined in .data._ZN11flatbuffers25flatbuffer_version_stringE(op_resolver.o) rejected in favor of Symbol defined in .data._ZN11flatbuffers25flatbuffer_version_stringE(flatbuffer_conversions.o).
This affects some projects, mainly embedded, where this compiler is popular. This can be seen in issues, like:
tensorflow/tensorflow#45686
https://forum.edgeimpulse.com/t/not-compiling-symbol-multiply-defined/496
I recommend to mimic the MSVC builds and not compile in the version string. It will not be used for the documented statistical purpose on those embedded platforms anyways.