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 b7c10bc
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 1 deletion.
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 = [email protected]:bombela/backward-cpp.git
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ else
git_submodules_action="ignore"
fi

git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"
git_submodules="ui/keycodemapdb ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu thirdparty/backward-cpp"
git="git"

# Don't accept a target_list environment variable.
Expand Down
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 scripts/archive-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ submodules="dtc meson ui/keycodemapdb"
submodules="$submodules tests/fp/berkeley-softfloat-3 tests/fp/berkeley-testfloat-3"
submodules="$submodules ui/thirdparty/imgui ui/thirdparty/implot ui/thirdparty/httplib util/xxHash tomlplusplus genconfig" # xemu extras
submodules="$submodules hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu"
submodules="$submodules thirdparty/backward-cpp"
sub_deinit=""

function cleanup() {
Expand Down
6 changes: 6 additions & 0 deletions scripts/gen-license.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,12 @@ def head(self):
submodule=Submodule('hw/xbox/nv2a/thirdparty/nv2a_vsh_cpu')
),

Lib('backward-cpp', 'https://github.com/bombela/backward-cpp',
mit, 'https://raw.githubusercontent.com/bombela/backward-cpp/master/LICENSE.txt'
ships_static=all_platforms,
submodule=Submodule('thirdparty/backward-cpp')
),

#
# Data files included with xemu
#
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 b7c10bc

Please sign in to comment.