Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/bolt
diff options
context:
space:
mode:
authorAmir Ayupov <aaupov@fb.com>2022-05-04 00:47:03 +0300
committerAmir Ayupov <aaupov@fb.com>2022-05-04 01:39:43 +0300
commit1d5263c554cbc39694e038f95c5a130171e3e224 (patch)
tree60647c44b85049a0b91ce062059150ca7f5810cf /bolt
parentafaa56df7a93f21cd1e49f7daa6a8970335744da (diff)
[BOLT][TEST] Fix test failures on AArch64 builder
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. Reviewed By: yota9 Differential Revision: https://reviews.llvm.org/D124863
Diffstat (limited to 'bolt')
-rw-r--r--bolt/test/Inputs/icf-jump-tables.c2
-rw-r--r--bolt/test/Inputs/stub.c1
-rw-r--r--bolt/test/Inputs/stub.h1
-rw-r--r--bolt/test/X86/Inputs/avx512.c7
-rw-r--r--bolt/test/X86/Inputs/inline-foo.c2
-rw-r--r--bolt/test/X86/inline-debug-info.test2
6 files changed, 6 insertions, 9 deletions
diff --git a/bolt/test/Inputs/icf-jump-tables.c b/bolt/test/Inputs/icf-jump-tables.c
index dc2321eadfdc..52b61ab0c034 100644
--- a/bolt/test/Inputs/icf-jump-tables.c
+++ b/bolt/test/Inputs/icf-jump-tables.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "stub.h"
int inc(int x) {
switch (x) {
diff --git a/bolt/test/Inputs/stub.c b/bolt/test/Inputs/stub.c
index 4bd3b2dac01b..cba30fcbe9ab 100644
--- a/bolt/test/Inputs/stub.c
+++ b/bolt/test/Inputs/stub.c
@@ -4,6 +4,7 @@ void *memcpy(void *dest, const void *src, unsigned long n) { return 0; }
void *memset(void *dest, int c, unsigned long n) { return 0; }
int printf(const char *format, ...) { return 0; }
void exit(int status) {}
+int puts(const char *s) { return 0; }
void *__gxx_personality_v0;
void *__cxa_allocate_exception;
diff --git a/bolt/test/Inputs/stub.h b/bolt/test/Inputs/stub.h
index 5c5b5d1f876a..a8b370e2c553 100644
--- a/bolt/test/Inputs/stub.h
+++ b/bolt/test/Inputs/stub.h
@@ -5,5 +5,6 @@ void *memcpy(void *dest, const void *src, unsigned long n);
void *memset(void *dest, int c, unsigned long n);
int printf(const char *format, ...);
void exit(int status);
+int puts(const char *s);
#endif
diff --git a/bolt/test/X86/Inputs/avx512.c b/bolt/test/X86/Inputs/avx512.c
index 719037968423..25f9502234bd 100644
--- a/bolt/test/X86/Inputs/avx512.c
+++ b/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");
+ asm("secondary_entry:");
}
int main() {
- printf("about to use avx-512 instruction...\n");
use_avx512();
return 0;
diff --git a/bolt/test/X86/Inputs/inline-foo.c b/bolt/test/X86/Inputs/inline-foo.c
index 12c737a67b89..1307c13f22ab 100644
--- a/bolt/test/X86/Inputs/inline-foo.c
+++ b/bolt/test/X86/Inputs/inline-foo.c
@@ -1,4 +1,4 @@
-#include <stdio.h>
+#include "stub.h"
void foo() {
puts("Hello world!\n");
diff --git a/bolt/test/X86/inline-debug-info.test b/bolt/test/X86/inline-debug-info.test
index 5a1b8965470e..950245c7cb7d 100644
--- a/bolt/test/X86/inline-debug-info.test
+++ b/bolt/test/X86/inline-debug-info.test
@@ -4,7 +4,7 @@
# REQUIRES: system-linux
# RUN: %clang %cflags -O1 -g %p/Inputs/inline-main.c %p/Inputs/inline-foo.c \
-# RUN: -o %t.exe -Wl,-q
+# RUN: -I%p/../Inputs -o %t.exe -Wl,-q
# RUN: llvm-bolt %t.exe -update-debug-sections -print-debug-info \
# RUN: -print-only=main -print-after-lowering -force-inline=foo -o %t.bolt \
# RUN: | FileCheck %s