|
1 | 1 | // REQUIRES: osx-ld64-live_support |
2 | 2 | // REQUIRES: lto |
3 | 3 |
|
4 | | -// RUN: %clang_profgen=%t.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip -o %t %s |
| 4 | +// RUN: %clang_profgen=%t.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip \ |
| 5 | +// RUN: -Wl,-sectalign,__DATA,__llvm_prf_cnts,0x1000 -Wl,-sectalign,__DATA,__llvm_prf_data,0x1000 -Wl,-sectalign,__DATA,__llvm_prf_bits,0x1000 -o %t %s |
5 | 6 | // RUN: %run %t |
6 | 7 | // RUN: llvm-profdata merge -o %t.profdata %t.profraw |
7 | 8 | // RUN: llvm-profdata show --all-functions %t.profdata | FileCheck %s -check-prefix=PROF |
|
10 | 11 | // RUN: otool -V -s __DATA __llvm_prf_names %t | FileCheck %s -check-prefix=PRF_NAMES |
11 | 12 | // RUN: otool -V -s __DATA __llvm_prf_cnts %t | FileCheck %s -check-prefix=PRF_CNTS |
12 | 13 |
|
13 | | -// RUN: %clang_lto_profgen=%t.lto.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip -flto -o %t.lto %s |
| 14 | +// RUN: %clang_lto_profgen=%t.lto.profraw -fcoverage-mapping -mllvm -enable-name-compression=false -DCODE=1 -Wl,-dead_strip -Wl,-w -flto \ |
| 15 | +// RUN: -Wl,-sectalign,__DATA,__llvm_prf_cnts,0x1000 -Wl,-sectalign,__DATA,__llvm_prf_data,0x1000 -Wl,-sectalign,__DATA,__llvm_prf_bits,0x1000 -o %t.lto %s |
14 | 16 | // RUN: %run %t.lto |
15 | 17 | // RUN: llvm-profdata merge -o %t.lto.profdata %t.lto.profraw |
16 | 18 | // RUN: llvm-profdata show --all-functions %t.lto.profdata | FileCheck %s -check-prefix=PROF |
|
25 | 27 | // Note: When there is no code in a program, we expect to see the exact same |
26 | 28 | // set of external functions provided by the profile runtime. |
27 | 29 |
|
28 | | -// RUN: %clang_profgen -fcoverage-mapping -Wl,-dead_strip -dynamiclib -o %t.nocode.dylib %s |
| 30 | +// RUN: %clang_profgen -fcoverage-mapping -Wl,-dead_strip -Wl,-sectalign,__DATA,__llvm_prf_cnts,0x1000 \ |
| 31 | +// RUN: -Wl,-sectalign,__DATA,__llvm_prf_data,0x1000 -Wl,-sectalign,__DATA,__llvm_prf_bits,0x1000 -dynamiclib -o %t.nocode.dylib %s |
29 | 32 | // RUN: nm -jgU %t.nocode.dylib > %t.nocode.syms |
30 | 33 | // RUN: nm -jgU %t | sed -e '/_\{1,\}main/d' -e '/_\{1,\}mh_execute_header/d' > %t.code.syms |
31 | 34 | // RUN: diff %t.nocode.syms %t.code.syms |
|
0 commit comments