This is an archive of the discontinued LLVM Phabricator instance.

[BOLT][TEST] Fix test failures on AArch64 builder
ClosedPublic

Authored by Amir on May 3 2022, 10:20 AM.

Details

Summary

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.

Diff Detail

Event Timeline

Amir created this revision.May 3 2022, 10:20 AM
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
Amir requested review of this revision.May 3 2022, 10:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 3 2022, 10:20 AM
yota9 accepted this revision.May 3 2022, 10:39 AM
yota9 added inline comments.
bolt/test/X86/Inputs/avx512.c
8

I have the same error in golang review, maybe it warnings about this new line, although I'm not sure what is going on with it on my review too :(

This revision is now accepted and ready to land.May 3 2022, 10:39 AM
Amir updated this revision to Diff 426805.May 3 2022, 12:31 PM

clang-format

Amir marked an inline comment as done.May 3 2022, 12:33 PM
Amir added inline comments.
bolt/test/X86/Inputs/avx512.c
8

Apparently clang-format was complaining about the space in second asm() line.

This revision was automatically updated to reflect the committed changes.
Amir marked an inline comment as done.
Amir added a comment.May 3 2022, 12:47 PM

This change breaks testing with an upstream clang:

/home/worker/bolt-worker2/bolt-x86_64-ubuntu-bolttests/llvm-project/bolt/test/Inputs/icf-jump-tables.c:3:13: error: call to undeclared function 'puts'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

Reverted the change for now, will figure out the proper fix and re-land.

Amir reopened this revision.May 3 2022, 12:48 PM
This revision is now accepted and ready to land.May 3 2022, 12:48 PM
Amir updated this revision to Diff 426852.May 3 2022, 2:59 PM

Fix build with upstream clang

yota9 accepted this revision.May 3 2022, 3:02 PM

@Amir Consider to add puts to stub.h and include the header

Amir updated this revision to Diff 426859.May 3 2022, 3:13 PM

Move puts to stub.h

Amir added a comment.May 3 2022, 3:14 PM

@Amir Consider to add puts to stub.h and include the header

Thanks for a suggestion!

yota9 accepted this revision.May 3 2022, 3:14 PM
This revision was automatically updated to reflect the committed changes.