[PATCH] D124863: [BOLT][TEST] Fix test failures on AArch64 builder

Amir Ayupov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 3 10:20:22 PDT 2022


Amir created this revision.
Herald added subscribers: ayermolo, pengfei, kristof.beyls.
Herald added a reviewer: rafauler.
Herald added a reviewer: maksfb.
Herald added a project: All.
Amir requested review of this revision.
Herald added subscribers: llvm-commits, yota9.
Herald added a project: LLVM.

Address X86 tests failures on AArch64 builder:
https://lab.llvm.org/staging/#/builders/211/builds/82

Inputs fail to cross-compile due to a missing header:

  /usr/include/stdio.h:27:10: fatal error: 'bits/libc-header-start.h' file not found
  #include <bits/libc-header-start.h>

As inputs are linked with `-nostdlib` anyway, don't include stdio.h.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D124863

Files:
  bolt/test/Inputs/icf-jump-tables.c
  bolt/test/X86/Inputs/avx512.c
  bolt/test/X86/Inputs/inline-foo.c


Index: bolt/test/X86/Inputs/inline-foo.c
===================================================================
--- bolt/test/X86/Inputs/inline-foo.c
+++ bolt/test/X86/Inputs/inline-foo.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+// don't include stdio as the test is linked with -nostdlib
 
 void foo() {
   puts("Hello world!\n");
Index: bolt/test/X86/Inputs/avx512.c
===================================================================
--- bolt/test/X86/Inputs/avx512.c
+++ bolt/test/X86/Inputs/avx512.c
@@ -1,14 +1,9 @@
-#include <stdio.h>
-
 void use_avx512() {
-  printf("after first entry\n");
   asm (".byte 0x62, 0xe2, 0xf5, 0x70, 0x2c, 0xda");
   asm ("secondary_entry:");
-  printf("after secondary entry\n");
 }
 
 int main() {
-  printf("about to use avx-512 instruction...\n");
   use_avx512();
 
   return 0;
Index: bolt/test/Inputs/icf-jump-tables.c
===================================================================
--- bolt/test/Inputs/icf-jump-tables.c
+++ bolt/test/Inputs/icf-jump-tables.c
@@ -1,5 +1,3 @@
-#include <stdio.h>
-
 int inc(int x) {
   switch (x) {
     case 0: puts("0"); return 1;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D124863.426760.patch
Type: text/x-patch
Size: 1109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220503/3ef6cd47/attachment.bin>


More information about the llvm-commits mailing list