[PATCH] D130034: [BOLT] Add BinaryContext::IsStripped

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 08:18:23 PST 2022


thakis added inline comments.
Herald added a subscriber: treapster.


================
Comment at: bolt/test/X86/is-strip.s:2
+# This reproduces a bug with jump table identification where jump table has
+# entries pointing to code in function and its cold fragment.
+
----------------
Amir wrote:
> Please update the summary.
This doesn't pass on systems were the system linker isn't an ELF linker, e.g. macOS:

```
+ : 'RUN: at line 3'
+ /Users/thakis/src/llvm-build-runtimes2/bin/clang++ /Users/thakis/src/llvm-project/bolt/test/X86/Inputs/linenumber.cpp -o /Users/thakis/src/llvm-build-runtimes2/tools/bolt/test/X86/Output/is-strip.s.tmp -Wl,-q
ld: unknown option: -q
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
```

This seems to fix it:

```
-# RUN: %clang++ %p/Inputs/linenumber.cpp -o %t -Wl,-q
+# RUN: %clang++ %cflags %p/Inputs/linenumber.cpp -o %t -Wl,-q
```

Is that the right fix?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130034/new/

https://reviews.llvm.org/D130034



More information about the llvm-commits mailing list