Commit eb0c47b
WIN-4497 | Link libunwind after folly (facebook#111)
Since facebook#97, we have been building folly with symbolizer enabled,
which causes it to depend on libunwind. However, we're now getting
linking errors when building with `ENABLE_HARDENING` introduced in facebook#107:
```
2025-10-13T18:33:00.3310227Z [ 98%] Linking CXX executable hhvm
2025-10-13T18:33:00.3391658Z Generating Repo Schema ID and Compiler ID
2025-10-13T18:33:39.5696188Z Precompiling systemlib files
2025-10-13T18:33:39.5980808Z ./hhvm: symbol lookup error: ./hhvm: undefined symbol: unw_getcontext
```
My hunch is that this happens because we're linking against libunwind rather
than LLVM libunwind in our internal build, libunwind is added to the link line
before the folly staticlib, which doesn't work with `-z,relro,-z,now` set by
the hardened build. I don't get this issue when building locally with LLVM libunwind,
which doesn't cause libunwind to be explicitly added to the link line at all.
So, link libunwind after folly.1 parent 8955716 commit eb0c47b
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | 350 | | |
355 | 351 | | |
356 | 352 | | |
| |||
436 | 432 | | |
437 | 433 | | |
438 | 434 | | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| |||
0 commit comments