Skip to content

Commit 0a4a0e1

Browse files
committed
Try to remove -lunwind from link flags
The possible reason why tests fail is that MAYBE there are another libunwind on the testing host which is loaded(?) instead of libunwind from llvm. clang passes 'right' libunwind (-lunwind) to the linker if -unwindlib=libunwind is passed to the driver
1 parent e53d98c commit 0a4a0e1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libunwind/test/configs/llvm-libunwind-shared.cfg.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ if '@CMAKE_DL_LIBS@':
2323
# Stack unwinding tests need unwinding tables and these are not generated by default on all targets.
2424
compile_flags.append('-funwind-tables')
2525

26+
# Use libunwind from llvm
27+
compile_flags.append('-rtlib=compiler-rt')
28+
compile_flags.append('-unwindlib=libunwind')
29+
2630
local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
2731
config.substitutions.append(('%{flags}',
2832
'-isysroot {}'.format(local_sysroot) if local_sysroot else ''
@@ -31,7 +35,7 @@ config.substitutions.append(('%{compile_flags}',
3135
'-nostdinc++ -I %{{include}} {}'.format(' '.join(compile_flags))
3236
))
3337
config.substitutions.append(('%{link_flags}',
34-
'-L %{{lib}} -Wl,-rpath,%{{lib}} -lunwind {}'.format(' '.join(link_flags))
38+
'-L %{{lib}} -Wl,-rpath,%{{lib}} {}'.format(' '.join(link_flags))
3539
))
3640
config.substitutions.append(('%{exec}',
3741
'%{executor} --execdir %T -- '

0 commit comments

Comments
 (0)