[llvm] [BOLT] Enable hugify for AArch64 (PR #117158)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 09:26:56 PST 2024
================
@@ -0,0 +1,34 @@
+// Make sure BOLT correctly processes --hugify option
+
+#include <stdio.h>
+
+int g1 = 1;
+int g2;
+static int sg1 = 1;
+static int sg2;
+
+
+int main(int argc, char **argv) {
+ printf("Hello world %p = %d , %p = %d\n", &g1, g1, &sg1, sg1);
+ printf("%p = %d , %p = %d\n", &g2, g2, &sg2, sg2);
+ return 0;
+}
+
+/*
+REQUIRES: system-linux,bolt-runtime
+
+RUN: %clang %cflags -no-pie %s -o %t.nopie.exe -Wl,-q
----------------
alekuz01 wrote:
Hi, @yavtuk.
Thanks for highlighting this.
Just a minor addition. The hugify test for AArch64 was slightly modified. That is why initially I kept it separated.
Regarding %cflags, If remove it what we should do with the following:
`--target=aarch64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -pie`
maybe we need to exclude -fPIE you mean for no-pie test?
Though, few tests were added as well:
- section-order.test
- user-func-reorder.c
Personally, I would prefer to have required flags specified explicitly in test file.
If you have some ideas about other tests that could benefit AArch64 from X86 set, let me know, I will try to check them.
https://github.com/llvm/llvm-project/pull/117158
More information about the llvm-commits
mailing list