Skip to content

Commit 27767c4

Browse files
[BOLT] Force frame pointers off for runtimes
Distributions are making the choice to turn frame pointers on by default. Nixpkgs recently turned them on, and the method they use to do so implies that everything is built with them on by default. NixOS/nixpkgs#399014 Assuming that a well behaved distribution doing this puts '-fno-omit-frame-pointer' at the beginning of the compiler invocation, we can still re-enable it by supplying -fomit-frame-pointer thereafter. See also: #147569
1 parent ab0d11c commit 27767c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bolt/runtime/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ set(BOLT_RT_FLAGS
3535
-fno-exceptions
3636
-fno-rtti
3737
-fno-stack-protector
38-
-fPIC)
38+
-fPIC
39+
-mgeneral-regs-only
40+
-fomit-frame-pointer # Runtime currently assumes omitted frame pointers. llvm/llvm-project#147569
41+
)
3942
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
4043
set(BOLT_RT_FLAGS ${BOLT_RT_FLAGS}
4144
-mno-sse

0 commit comments

Comments
 (0)