llvm-project/bolt/test/max-funcs.test
Nikita Popov 1f84bdeac2
[BOLT] Fix test with -DCLANG_DEFAULT_PIE_ON_LINUX=OFF (#185047)
Use `%cxxflags`, so that `-fPIE -pie` get passed in order to ensure the
test behavior is the same regardless of cmake configuration. We do
similar in many other BOLT tests.
2026-03-09 14:21:00 +01:00

14 lines
447 B
Plaintext

## Check that --max-funcs=<N> option works properly in llvm-bolt,
## resulting in processing of no more than N functions in the binary.
REQUIRES: system-linux
RUN: %clangxx %cxxflags %p/Inputs/bolt_icf.cpp -g -Wl,-q -o %t.exe
RUN: llvm-bolt %t.exe --relocs -o %t --max-funcs=2
RUN: llvm-objdump -d -j .text %t | FileCheck %s
## Check that there are only two functions in the dump of .text
CHECK: <{{.*}}>:
CHECK: <{{.*}}>:
CHECK-NOT: <{{.*}}>: