From patchwork Tue May 23 13:53:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 684979 Delivered-To: patch@linaro.org Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp1741985wrt; Tue, 23 May 2023 07:12:02 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6e7hSKg+RjMWxcUoc145yEMbXY4FDsHQHAAzg+GPYg9U0fVLIzjnaf+uDNDpHnH8tApqYq X-Received: by 2002:a37:aa07:0:b0:75b:23a1:d8cb with SMTP id t7-20020a37aa07000000b0075b23a1d8cbmr5172045qke.15.1684851121870; Tue, 23 May 2023 07:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684851121; cv=none; d=google.com; s=arc-20160816; b=CFBJewYN4QzM6rQWCC15IQNOa+lO9GkyBwzc1EHj38+/gc3or/qtty/tozAI3epgoG qJd7Eop3neS8K339cBKeEo7Lw3WE81MJJZtgkhjHT2hRUkSFahMLK2su3iFpgIZPKbhw D4hJ0MFGjLZn23olPcGODmttrWLJzibfy2OwAsICVc/vHIaxU6a7/TY1ETsHpqQoF+Iv +G3g3fTYkS8glgeIpS2cxqLsprgqb+sd+VZ9nDm26BCrjWmP67bSnmkG13vL9ncPL+9a h9xQrU2FUwA8ckQ4k7jn9nQXSWJjWHSAM8PXBAU124PvWp9SsA1Va+Mf3gC7jNiLjFCp Iduw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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:to:from :dkim-signature; bh=nI2w8QPEk+92crMZ+axm4/ERglLN4PhhZ5orQ1/925g=; b=L7Rp/sNDpPCtPxARczB4kvF6QF2TTOIvl6LeryDnR3y7axCdwb2YkuxBFS9xTmU2k9 PcLWi1zXUFTrH8qvLFgHXitf1dkhX/d84kiXXmlCVtZitYgVp2dQpdAP7YIhwncKTMDz DTQ0kB0bFNhsh4bfFDwjAF5OOjQxAks722me/wUNtaeVf/tdsVWvyjGdFjVt+FXT/tMW ZHM38W9p5DPMzLzRGX7FZ5MFvHoyN3vN69nAWziTTv7iSL/Z8pIB+wy1dkI8I2zlze1C ebhYPtSJvC2ipSDN+pqrNI37kui+OGpTgTJS3qBZtTWA/zSCKnTObjYjo7jQGNANsWkh +tIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=n+oI1x49; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b26-20020a05620a119a00b0074e3db3adc6si4824553qkk.186.2023.05.23.07.12.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 23 May 2023 07:12:01 -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=n+oI1x49; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1SVm-0003VJ-A6; Tue, 23 May 2023 09:57:14 -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 1q1SVi-0003O5-Dp for qemu-devel@nongnu.org; Tue, 23 May 2023 09:57:10 -0400 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q1SVg-0004E8-JU for qemu-devel@nongnu.org; Tue, 23 May 2023 09:57:10 -0400 Received: by mail-pf1-x433.google.com with SMTP id d2e1a72fcca58-64d44b198baso2527851b3a.0 for ; Tue, 23 May 2023 06:57:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684850227; x=1687442227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=nI2w8QPEk+92crMZ+axm4/ERglLN4PhhZ5orQ1/925g=; b=n+oI1x49R+cr4UbKa9yA+wahQcPCTjr1AU9phksY2VT9JISvKojbmuS1t60OV99Am6 yPxIzx+xcLzehh/WdtX3wJCb0CP+Op6+on0aKK3cJPCZ8d8QdURnQNMM8/2k8+vfRV4A PGg3Th+ezTYfEYkSj0QwN11C6mXeSWdWtR62j4g4B81yqc6QWfNr9bpM6wREQ0PrhCGD hBYWj97bjJH6zknsEApKg6vLI73EmK9jgoWY2+0b45xEq2Ny/jDDgIcsuGz4zgYNH+D0 YU2UywxdLJp4oNr6hDBF379vghLScSzuUQHDPEJW79dQlqI4J/4jgt3HE+8A1NU6JEHo 3wmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684850227; x=1687442227; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nI2w8QPEk+92crMZ+axm4/ERglLN4PhhZ5orQ1/925g=; b=d1JEoi2Y7FV83dvm6suJJqLSA1Ryj9O7ItcImgEa7Duokv0Xrh2YP8GUl9VBYwfFro wVRqnedG5bE/xnb1SKpNGkwKF9KsPqticJsm9cSGM7NEB8wppI5Yku6mHvJwnK8NJBYF 6wSVfFz5+aD2lBpv36txlWTB8/UYj/gaV9/6/InR5YI9us3YXDoDhN/y0OiyTKEGFYi5 pde0OkPWwP4jhdvHylaavOHGfoRaMKHG9ICCd1I1dIXhwWLtKJPPEHGxZCv7m5faGlTG +6QoMYJrtNV34vUjhNxOSYsMjG9UKj5QnECjbvC+2jMLEzLo+HopObZ8czvY3rQx1Nn4 ZxLg== X-Gm-Message-State: AC+VfDyIcP0d8HR2uuDOQPI7JwMDbeEVqyH9tCekDagSDo2EJxd5EKck IwOr/nw03MPV+ji1UEI42z7o5KV2W2puNMNUHKQ= X-Received: by 2002:a05:6a00:13a7:b0:63d:6744:8cae with SMTP id t39-20020a056a0013a700b0063d67448caemr17906298pfg.2.1684850227229; Tue, 23 May 2023 06:57:07 -0700 (PDT) Received: from stoup.. ([2602:ae:1598:4c01:c13a:d73:4f88:3654]) by smtp.gmail.com with ESMTPSA id v11-20020a62a50b000000b0063799398eaesm5805790pfm.51.2023.05.23.06.57.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 May 2023 06:57:06 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 52/52] tcg: Build once for system and once for user-only Date: Tue, 23 May 2023 06:53:22 -0700 Message-Id: <20230523135322.678948-53-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230523135322.678948-1-richard.henderson@linaro.org> References: <20230523135322.678948-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::433; envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x433.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham 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 Create two static libraries for use by each execution mode. Signed-off-by: Richard Henderson --- tcg/meson.build | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/tcg/meson.build b/tcg/meson.build index bdc185a485..565c60bc96 100644 --- a/tcg/meson.build +++ b/tcg/meson.build @@ -1,3 +1,7 @@ +if not get_option('tcg').allowed() + subdir_done() +endif + tcg_ss = ss.source_set() tcg_ss.add(files( @@ -14,8 +18,28 @@ tcg_ss.add(files( if get_option('tcg_interpreter') libffi = dependency('libffi', version: '>=3.0', required: true, method: 'pkg-config') - specific_ss.add(libffi) - specific_ss.add(files('tci.c')) + tcg_ss.add(libffi) + tcg_ss.add(files('tci.c')) endif -specific_ss.add_all(when: 'CONFIG_TCG', if_true: tcg_ss) +tcg_ss = tcg_ss.apply(config_host, strict: false) + +libtcg_user = static_library('tcg_user', + tcg_ss.sources() + genh, + name_suffix: 'fa', + c_args: '-DCONFIG_USER_ONLY', + build_by_default: have_user) + +tcg_user = declare_dependency(link_with: libtcg_user, + dependencies: tcg_ss.dependencies()) +user_ss.add(tcg_user) + +libtcg_softmmu = static_library('tcg_softmmu', + tcg_ss.sources() + genh, + name_suffix: 'fa', + c_args: '-DCONFIG_SOFTMMU', + build_by_default: have_system) + +tcg_softmmu = declare_dependency(link_with: libtcg_softmmu, + dependencies: tcg_ss.dependencies()) +softmmu_ss.add(tcg_softmmu)