From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 71BA643086; Wed, 16 Aug 2023 23:56:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E8F3F42B8B; Wed, 16 Aug 2023 23:56:25 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 4648A40ED9 for ; Wed, 16 Aug 2023 23:56:23 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 973A2211F7A1; Wed, 16 Aug 2023 14:56:22 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 973A2211F7A1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1692222982; bh=tFtPwRO1U6JpXiQuWkrmOwTG9wSAqtJWzlOWfFJiZSw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UjrFHkisiW7vs89jY7QRV9cWTQoE9zNJlFUlOjXt0oKhCViHIAiZRcupTAKI9v/uI XV4ryt3S+Ci+UG9ZhT4nAwdh/T3aPKwi5YpzaX86ygooLqYGocAvMXec7KP4vM4Q9C aQgXagDVmA/9pWBTr4PnU6qN+/6faX13FOhcJNzE= From: Tyler Retzlaff To: dev@dpdk.org Cc: Bruce Richardson , Konstantin Ananyev , david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v5 2/4] build: determine execution environment at config time Date: Wed, 16 Aug 2023 14:56:14 -0700 Message-Id: <1692222976-2908-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1692222976-2908-1-git-send-email-roretzla@linux.microsoft.com> References: <1674674707-3094-1-git-send-email-roretzla@linux.microsoft.com> <1692222976-2908-1-git-send-email-roretzla@linux.microsoft.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Move execution environment determination and definitions to config. The RTE_EXEC_ENV macros are actually used by libraries built before EAL. Currently it does not matter that this is determined in lib/eal since the definitions are consumed before anything is built including libs built before lib/eal. By moving this logic to config it allows kvargs and telemetry to be built without EAL. No functional change intended. Signed-off-by: Tyler Retzlaff Acked-by: Bruce Richardson --- config/meson.build | 8 ++++++++ lib/eal/meson.build | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/config/meson.build b/config/meson.build index b6c7d48..821a1c3 100644 --- a/config/meson.build +++ b/config/meson.build @@ -14,6 +14,14 @@ foreach env:supported_exec_envs set_variable('is_' + env, exec_env == env) endforeach +exec_envs = {'freebsd': 0, 'linux': 1, 'windows': 2} +foreach env, id:exec_envs + dpdk_conf.set('RTE_ENV_' + env.to_upper(), id) + dpdk_conf.set10('RTE_EXEC_ENV_IS_' + env.to_upper(), (exec_env == env)) +endforeach +dpdk_conf.set('RTE_EXEC_ENV', exec_envs[exec_env]) +dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1) + # MS linker requires special treatment. # TODO: use cc.get_linker_id() with Meson >= 0.54 is_ms_compiler = is_windows and (cc.get_id() == 'msvc') diff --git a/lib/eal/meson.build b/lib/eal/meson.build index 0fb974c..9942104 100644 --- a/lib/eal/meson.build +++ b/lib/eal/meson.build @@ -10,14 +10,6 @@ if not is_windows subdir('unix') endif -exec_envs = {'freebsd': 0, 'linux': 1, 'windows': 2} -foreach env, id:exec_envs - dpdk_conf.set('RTE_ENV_' + env.to_upper(), id) - dpdk_conf.set10('RTE_EXEC_ENV_IS_' + env.to_upper(), (exec_env == env)) -endforeach -dpdk_conf.set('RTE_EXEC_ENV', exec_envs[exec_env]) - -dpdk_conf.set('RTE_EXEC_ENV_' + exec_env.to_upper(), 1) subdir(exec_env) subdir(arch_subdir) -- 1.8.3.1