Under the latest 6.17 compiler Omax, the link error: L6654: Rejected Local symbol *** referred to from non group member lto-llvm-***.o(.text.***). This error message is consistent with Inline static variables are defined in the class, for example:class A {public: inline static uint32_t s_Var{};}
This problem can also occur under O0 (some files are O1/Ofast). When there are more "inline static" members in .h (distributed in different .h files), this compiler basically fails to link successfully
HelloI was about to ask if you had enabled link time optimization in the link step (--lto), as the above object is a result of the implied -flto of -Omax. However your follow up comment may suggest that is not the issue.
We would likely need an example that illustrates this problem to properly investigate. If you are not able to share in public forum, please raise an official support request via the support menu above.
Regards, Ronan
Hello Ronan Synnott,
Both armclang and armlink use -Omax.example:// A.hclass A {public: inline static uint32_t s_Var{};};extern A g_A;And reference the header file in multiple .c files, there will be problems when linking
Hi again, you should raise an official support request so that Arm can investigate properly.