From patchwork Fri May 16 05:27:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pierrick Bouvier X-Patchwork-Id: 890606 Delivered-To: patch@linaro.org Received: by 2002:adf:e58d:0:b0:3a3:61c9:c5d4 with SMTP id l13csp82066wrm; Thu, 15 May 2025 22:28:25 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVGeNuZ82kScsvuOT6ym+BteDwn9i3Ax1+Ym99P0lKwl1RgdhiOGuiuY1CdeTJ94uVz9fi/bQ==@linaro.org X-Google-Smtp-Source: AGHT+IGgu1ODiz1TIz9lEf6v9zxye3UrzfTps3vxsZI6c987L921FQWM+OuVxJwUpexEE9LQ1/Cl X-Received: by 2002:a05:622a:598f:b0:476:850a:5b34 with SMTP id d75a77b69052e-494ae3e6282mr36395881cf.30.1747373305525; Thu, 15 May 2025 22:28:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1747373305; cv=none; d=google.com; s=arc-20240605; b=FRomZRb5h+6onN/Vca6BsnPTa+4tiTB1Y1H1jg9fcIGNfCDJHetITilm6E2VomjoGS Bj01OhJ0d9ZFCAJ3jvEJCGZjwvepKNzhS5vWd//xJcb3P4k7dSzqea1X8CIufconudtl uVDg3OQI7AtNTSJOGthAH+px7iisO4EI6dpdiVWO7gYLMyCz6nMDyw+L0SldVBRTttnD ttk44TipPIwNN0blH5xbGc1pRxUn/EeprMjuJU4LqvKYKfkgtWLZunzLYaQRFbUp37UO vw0JEfSJ+PQr83gDHrkh9cxXJFLM+nM38yOks5DibkvaCA4dGivPcOC0RPbPVWHVyIDN XJZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kXBESZVUZ0qJuwgxJHdI3VR+MEIbN3bpMpEGJ/yalXg=; fh=a6UbtOiHwyJoMPV3UeNgHrbW2rQ4OdKN6ZJtoRFzk44=; b=RXCXXCVGg/36zZDWgjq8rV5wqlDEtYeCESb8cPLTS/3P/bkSRstJg5LHA3SrqVjrZR GivkjEoqTJu5s0XyCnUTSLCpkJM7l6QD9vLGeWS9kRtYV2sE9+ZhRAM1ky9f+8kzvN2+ dUIZzCNiY4YS5AchvGlEL15vINC+anSqYBIk8YfcCmDiQO6EEfqJ9y15w5KkRVdV/Gc1 VIJL4no/rcHwA3Kqt7Ad0ijEab1VUl/y29zN+zpqHTxyeZWIVXPwfme3SMfFO9OGeuna R7tYcnnxB7aRACo2qc2Bgl0MV/Mvs082IU/+NlAquybtweDkTN6kA8JYlGWsQzq0TEyw oC4A==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OV6+ghR4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-494ae592c06si13258451cf.482.2025.05.15.22.28.25 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 15 May 2025 22:28:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OV6+ghR4; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uFnbT-0006Ie-2Y; Fri, 16 May 2025 01:27:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uFnbR-0006HW-Ao for qemu-devel@nongnu.org; Fri, 16 May 2025 01:27:25 -0400 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uFnbP-0001NL-Et for qemu-devel@nongnu.org; Fri, 16 May 2025 01:27:25 -0400 Received: by mail-pl1-x634.google.com with SMTP id d9443c01a7336-231d4679580so4642245ad.1 for ; Thu, 15 May 2025 22:27:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1747373242; x=1747978042; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kXBESZVUZ0qJuwgxJHdI3VR+MEIbN3bpMpEGJ/yalXg=; b=OV6+ghR4XJLqcSAEn7IvPpjnpDkZpDcHFvAsHDGDBFFxsAQvIPbFr2y0zKMczmaBQw rEeBHKBBGqMCToQAUqf+JFlXNBORK9XnVmUafS1t3TDJcIDPJkO9zzGlg+a8F4LgQIQt wU8fkwDiYr/XPPXw6y4izJnu/OHaJJwYAVNUw2zGlAKu7cJBqnD8zaFbGsa9Rt1WxRzv Rhtq+DD2XVey5X/gkBOIjICTPNbFzjeLNm4tvx6L/JktivAFdiZl9V9aA9qg4im6v0dN 9nJfE96rjr3A2qLCxXTfK0mUqhvykIdLJJy9cD4GZk6I9ZdpZHwC6ndmjb9uWsCbe56w tJzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1747373242; x=1747978042; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kXBESZVUZ0qJuwgxJHdI3VR+MEIbN3bpMpEGJ/yalXg=; b=UCR1ji1u2fiMEMkhQXGCqCufZOzVNeo6djnDbKQ5BMecyoKEHYQtxA/Fqo35lUAVcy pVGKpZ13XTnX4vcwXwKkLUPtfAVqKa8Sxnf6C+qp2obwS2r/B3AbNVhcGBQKidXe23EP wkytwVs509JW2tSQ6BOxLFf9+loLT3FNq8lyoJ/saTHmi/Ifcx22p+ggf1WIQHMpJnJD iw3bHElqszqWhCnS+3lbGbP8YnkzLNQTztK4GZpHuw407Am/zVWiWTDn30RpMfEd7dh3 EHNP9ltKgJeCK/qJaR2nYraVXwu/twWNVskUJLkku/2hnwcwm3FW4nw9v2EDMt/qygS6 vjBA== X-Gm-Message-State: AOJu0YxgIiLPNynWTP957UbPYTGfAfZyvZEnJDuvi2REo8tPol4HZ9hP OTAdfbai2i2ZMXEP9CnApX2i26oI0pVI2QPkMYjkRiGDj6DXnQ8f4wsokgp+ePGs3ocAVd+u89/ 2HS1S X-Gm-Gg: ASbGncsO8iMQGYSeDHZYNAQJS5xHvTc6D1x8F8DXSZBQS7icVzRm7ILOakkz0Z0yfaK eZdBq3EloAfwSO/B4qLIdpyeBLF8W/pWdmK3N4FTn2WpNuQ05+RZmQWgZuA03jis4hCHSgiFFNb ewcDyatTCNxF8rzdEkhwLLaOdr/Hvst/6v6+aUSqhmVq/cjuNbYZVGyHC1BTqonliy9YS7jeLEA GrlDi86/XKm/e2G+JRvrK2KWvG4hGS9FsU3hDKBnSUPT0mF6dapA2NPYMGs++2Oma5PXYhhJ0N5 z8nh7z3kOxQOSSXZfncD8csxF1EyBDvZsEhatDA+rWIevFOCGP8= X-Received: by 2002:a17:902:c948:b0:22f:c91f:d05f with SMTP id d9443c01a7336-231d45c99c7mr26113395ad.46.1747373241875; Thu, 15 May 2025 22:27:21 -0700 (PDT) Received: from pc.. ([38.41.223.211]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-231d4ebabfesm6539135ad.174.2025.05.15.22.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 May 2025 22:27:21 -0700 (PDT) From: Pierrick Bouvier To: qemu-devel@nongnu.org Cc: Richard Henderson , Paolo Bonzini , berrange@redhat.com, =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , thuth@redhat.com, Peter Maydell , =?utf-8?q?Marc-Andr=C3=A9_Lureau?= , Pierrick Bouvier , =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH 5/6] meson: merge lib{system, user}_ss with {system, user}_ss. Date: Thu, 15 May 2025 22:27:07 -0700 Message-ID: <20250516052708.930928-6-pierrick.bouvier@linaro.org> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250516052708.930928-1-pierrick.bouvier@linaro.org> References: <20250516052708.930928-1-pierrick.bouvier@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::634; envelope-from=pierrick.bouvier@linaro.org; helo=mail-pl1-x634.google.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Now that target configuration can be applied to lib{system, user}_ss, there is no reason to keep that separate from the existing {system, user}_ss. We extract existing system/user code common common libraries to lib{system, user}. To not break existing meson files, we alias libsystem_ss to system_ss and libuser_ss to user_ss, so we can do the cleanup in next commit. Signed-off-by: Pierrick Bouvier --- meson.build | 38 +++++++++++++++++++++++--------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/meson.build b/meson.build index fadee0f29fa..98b97fd7ba3 100644 --- a/meson.build +++ b/meson.build @@ -3712,14 +3712,14 @@ io_ss = ss.source_set() qmp_ss = ss.source_set() qom_ss = ss.source_set() system_ss = ss.source_set() -libsystem_ss = ss.source_set() +libsystem_ss = system_ss specific_fuzz_ss = ss.source_set() specific_ss = ss.source_set() rust_devices_ss = ss.source_set() stub_ss = ss.source_set() trace_ss = ss.source_set() user_ss = ss.source_set() -libuser_ss = ss.source_set() +libuser_ss = user_ss util_ss = ss.source_set() # accel modules @@ -4098,21 +4098,19 @@ common_ss.add(hwcore) system_ss.add(authz, blockdev, chardev, crypto, io, qmp) common_ss.add(qom, qemuutil) -common_ss.add_all(when: 'CONFIG_SYSTEM_ONLY', if_true: [system_ss]) -common_ss.add_all(when: 'CONFIG_USER_ONLY', if_true: user_ss) - libuser = static_library('user', - libuser_ss.all_sources() + genh, + user_ss.all_sources() + genh, c_args: ['-DCONFIG_USER_ONLY', '-DCOMPILING_SYSTEM_VS_USER'], - dependencies: libuser_ss.all_dependencies(), + include_directories: common_user_inc, + dependencies: user_ss.all_dependencies(), build_by_default: false) libsystem = static_library('system', - libsystem_ss.all_sources() + genh, + system_ss.all_sources() + genh, c_args: ['-DCONFIG_SOFTMMU', '-DCOMPILING_SYSTEM_VS_USER'], - dependencies: libsystem_ss.all_dependencies(), + dependencies: system_ss.all_dependencies(), build_by_default: false) # Note that this library is never used directly (only through extract_objects) @@ -4121,7 +4119,6 @@ libsystem = static_library('system', common_all = static_library('common', build_by_default: false, sources: common_ss.all_sources() + genh, - include_directories: common_user_inc, implicit_include_directories: false, dependencies: common_ss.all_dependencies()) @@ -4135,10 +4132,20 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak inc = [common_user_inc + target_inc] target_common = common_ss.apply(config_target, strict: false) + target_system = system_ss.apply(config_target, strict: false) + target_user = user_ss.apply(config_target, strict: false) common_deps = [] + system_deps = [] + user_deps = [] foreach dep: target_common.dependencies() common_deps += dep.partial_dependency(compile_args: true, includes: true) endforeach + foreach dep: target_system.dependencies() + system_deps += dep.partial_dependency(compile_args: true, includes: true) + endforeach + foreach dep: target_user.dependencies() + user_deps += dep.partial_dependency(compile_args: true, includes: true) + endforeach # prevent common code to access cpu compile time definition, # but still allow access to cpu.h @@ -4154,7 +4161,7 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak sources: src.all_sources() + genh, include_directories: inc, c_args: target_system_c_args, - dependencies: src.all_dependencies() + common_deps) + dependencies: src.all_dependencies() + common_deps + system_deps) hw_common_arch_libs += {target_base_arch: lib} endif endif @@ -4168,7 +4175,8 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak sources: src.all_sources() + genh, include_directories: inc, c_args: target_c_args, - dependencies: src.all_dependencies() + common_deps) + dependencies: src.all_dependencies() + common_deps + + system_deps + user_deps) target_common_arch_libs += {target_base_arch: lib} endif endif @@ -4182,7 +4190,7 @@ foreach target_base_arch, config_base_arch : config_base_arch_mak sources: src.all_sources() + genh, include_directories: inc, c_args: target_system_c_args, - dependencies: src.all_dependencies() + common_deps) + dependencies: src.all_dependencies() + common_deps + system_deps) target_common_system_arch_libs += {target_base_arch: lib} endif endif @@ -4358,12 +4366,12 @@ foreach target : target_dirs objects = [common_all.extract_objects(target_common.sources())] arch_deps += target_common.dependencies() if target_type == 'system' - src = libsystem_ss.apply(config_target, strict: false) + src = system_ss.apply(config_target, strict: false) objects += libsystem.extract_objects(src.sources()) arch_deps += src.dependencies() endif if target_type == 'user' - src = libuser_ss.apply(config_target, strict: false) + src = user_ss.apply(config_target, strict: false) objects += libuser.extract_objects(src.sources()) arch_deps += src.dependencies() endif