-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "qemu: fix resource exhaustion building QEMU TCTI"
- Loading branch information
Showing
2 changed files
with
2 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -594,70 +594,3 @@ index e139f7115e1f..765892f84f1c 100644 | |
qemu_console_get_height(s, -1) == height) { | ||
return; | ||
} | ||
From 7f65c39e6865763cb8a614a8903b25f23a9a8683 Mon Sep 17 00:00:00 2001 | ||
From: osy <[email protected]> | ||
Date: Fri, 19 Aug 2022 14:07:10 -0700 | ||
Subject: [PATCH] tcg-tcti: fix memory usage issues with clang build | ||
|
||
Build with -O0 to avoid blowing up the memory during build. | ||
--- | ||
meson.build | 12 ++++++++++++ | ||
tcg/meson.build | 8 +++++++- | ||
2 files changed, 19 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/meson.build b/meson.build | ||
index d66b73d009..b144789c5e 100644 | ||
--- a/meson.build | ||
+++ b/meson.build | ||
@@ -2649,6 +2649,7 @@ qom_ss = ss.source_set() | ||
softmmu_ss = ss.source_set() | ||
specific_fuzz_ss = ss.source_set() | ||
specific_ss = ss.source_set() | ||
+specific_nooptimize_ss = ss.source_set() | ||
stub_ss = ss.source_set() | ||
trace_ss = ss.source_set() | ||
user_ss = ss.source_set() | ||
@@ -3217,6 +3218,17 @@ foreach target : target_dirs | ||
arch_srcs += target_specific.sources() | ||
arch_deps += target_specific.dependencies() | ||
|
||
+ nooptimize_ss = specific_nooptimize_ss.apply(config_target, strict: false) | ||
+ if nooptimize_ss.sources().length() > 0 | ||
+ libnooptimize = static_library('qemu-' + target + '-nooptimize', | ||
+ sources: genh + nooptimize_ss.sources(), | ||
+ include_directories: target_inc, | ||
+ dependencies: nooptimize_ss.dependencies(), | ||
+ c_args: c_args + '-O0') | ||
+ nooptimize = declare_dependency(link_whole: libnooptimize) | ||
+ arch_deps += nooptimize | ||
+ endif | ||
+ | ||
if config_all.has_key('CONFIG_SHARED_LIBRARY_BUILD') | ||
build_lib_args = { | ||
'target_type': 'shared_library', | ||
diff --git a/tcg/meson.build b/tcg/meson.build | ||
index c4c63b19d4..16c226e114 100644 | ||
--- a/tcg/meson.build | ||
+++ b/tcg/meson.build | ||
@@ -3,7 +3,6 @@ tcg_ss = ss.source_set() | ||
tcg_ss.add(files( | ||
'optimize.c', | ||
'region.c', | ||
- 'tcg.c', | ||
'tcg-common.c', | ||
'tcg-op.c', | ||
'tcg-op-gvec.c', | ||
@@ -18,3 +17,10 @@ if get_option('tcg_interpreter') | ||
endif | ||
|
||
specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) | ||
+ | ||
+# TCTI requires -O0 or otherwise clang memory usage blows up | ||
+if get_option('tcg_threaded_interpreter') | ||
+ specific_nooptimize_ss.add(when: 'CONFIG_TCG', if_true: files('tcg.c')) | ||
+else | ||
+ specific_ss.add(when: 'CONFIG_TCG', if_true: files('tcg.c')) | ||
+endif | ||
-- | ||
2.28.0 | ||
|