================
@@ -9,4 +9,14 @@
 # define ALIGNED(x) __attribute__((aligned(x)))
 #endif
 
+inline void __llvm_profile_test_initialize() {
+  // This is a no-op on most platforms, but on AIX it forces the linker to
+  // keep the start/stop stub data for the runtime. Normally this data is
+  // referenced by pulling in `__llvm_profile_runtime` from the runtime but
+  // some tests explicitly supress that.
----------------
w2yehia wrote:

so the usecase of defining `__llvm_profile_runtime` in the user code to avoid 
automatic initialization of the runtime, under the -bcdtors:mbr settings, is 
broken and users would need to create a reference to `__llvm_profile_keep`. We 
can add `-u__llvm_profile_keep` to the AIX link step in the driver, but I'm not 
sure if it will have some unintended consequences such as keeping any 
constructors defined in the same file as `__llvm_profile_keep` (none today). 
I'm in favor of keeping things as is, until we find the need to fix this.

https://github.com/llvm/llvm-project/pull/191265
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to