mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-19 06:36:50 +00:00

1. With a Clang that doesn't default to GNU extensions they need to be enabled explicitly. 2. The X86 directory lit config sets it already, there's no reason for this test to do it by itself. 3. The C frontend executable will fail if there's for example a Clang resource file for the C++ mode that sets C++-specific options: ``` + /home/tambre/dev/llvm/build/bin/clang --target=x86_64-unknown-linux-gnu -fPIE -fuse-ld=lld -Wl,--unresolved-symbols=ignore-all -pie -fPIC -shared /home/tambre/dev/llvm/bolt/test/R_ABS.pic.lld.cpp -o /home/tambre/dev/llvm/build/tools/bolt/test/Output/R_ABS.pic.lld.cpp.tmp.so -Wl,-q -fuse-ld=lld clang: warning: argument unused during compilation: '-pie' [-Wunused-command-line-argument] error: invalid argument '-std=c23' not allowed with 'C++' ```
11 lines
433 B
Plaintext
11 lines
433 B
Plaintext
## Check that we do not reject position-independent executables (PIEs).
|
|
|
|
## This test uses the clang driver without target flags and will only succeed
|
|
## on Linux systems where the host triple matches the target.
|
|
REQUIRES: system-linux
|
|
|
|
RUN: %clangxx %cxxflags -fPIC -pie %p/Inputs/jump_table_icp.cpp -o %t
|
|
RUN: llvm-bolt %t -o %t.null 2>&1 | FileCheck %s
|
|
|
|
CHECK: BOLT-INFO: shared object or position-independent executable detected
|