Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
antangelo committed Aug 2, 2024
1 parent a8d8ef5 commit 37b250e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,6 @@
[submodule "ui/thirdparty/httplib"]
path = ui/thirdparty/httplib
url = https://github.com/yhirose/cpp-httplib
[submodule "thirdparty/backward-cpp"]
path = thirdparty/backward-cpp
url = git@github.com:bombela/backward-cpp.git
13 changes: 13 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,16 @@ if 'dtrace' in get_option('trace_backends')
endif
endif

libunwind = dependency('libunwind', required : false, kwargs : static_kwargs)
if libunwind.found()
add_global_arguments('-DBACKWARD_HAS_LIBUNWIND=1', language : 'cpp')
endif

libdw = dependency('libdw', required : false, kwargs: static_kwargs)
if libdw.found()
add_global_arguments('-DBACKWARD_HAS_DW=1', language : 'cpp')
endif

if get_option('iasl') == ''
iasl = find_program('iasl', required: false)
else
Expand All @@ -192,6 +202,8 @@ endif
qemu_ldflags += cc.get_supported_link_arguments('-Wl,-z,relro', '-Wl,-z,now')

if targetos == 'windows'
# These are required for backward-cpp to produce a stack trace
qemu_ldflags += ['-ldbghelp', '-lucrt']
qemu_ldflags += cc.get_supported_link_arguments('-Wl,--no-seh', '-Wl,--nxcompat')
# Disable ASLR for debug builds to allow debugging with gdb
if get_option('optimization') == '0'
Expand Down Expand Up @@ -3111,6 +3123,7 @@ subdir('hw')
subdir('gdbstub')
subdir('data')
subdir('winpcap-loader')
subdir('thirdparty')


if enable_modules
Expand Down
1 change: 1 addition & 0 deletions thirdparty/backward-cpp
Submodule backward-cpp added at 51f070
11 changes: 11 additions & 0 deletions thirdparty/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
if libunwind.found()
softmmu_ss.add(libunwind)
endif

if libdw.found()
softmmu_ss.add(libdw)
endif

softmmu_ss.add(files(
'backward-cpp/backward.cpp'
))

0 comments on commit 37b250e

Please sign in to comment.