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 6A8AC42478; Wed, 25 Jan 2023 20:25:25 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2BF0E42DBF; Wed, 25 Jan 2023 20:25:17 +0100 (CET) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id E44D542DB2 for ; Wed, 25 Jan 2023 20:25:14 +0100 (CET) Received: by linux.microsoft.com (Postfix, from userid 1086) id 2ED4920E6561; Wed, 25 Jan 2023 11:25:14 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 2ED4920E6561 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1674674714; bh=+HoO1gQGOR8ckbKO+Gl+Wb6fRvLlxLSVb8n4Cc7Za3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ilLS7xwr3EM7PaW9X3EQHbzyuLipaChKK3cZBOLcdxIX6ZlSJnzEdCs7WkFiJjMjB HjSlUWkfvIeqwRnrX4UmT6+wO4lOA4P9eet7+jRBOPb+2XgZsucpVkMbZMmBEsHQMM O3agn9N+t2uUCDcGoBE0hfsD1msTQyOE2H2DBoOQ= From: Tyler Retzlaff To: dev@dpdk.org Cc: bruce.richardson@intel.com, Tyler Retzlaff Subject: [PATCH 2/3] build: determine execution environment at config time Date: Wed, 25 Jan 2023 11:25:06 -0800 Message-Id: <1674674707-3094-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1674674707-3094-1-git-send-email-roretzla@linux.microsoft.com> References: <1674674707-3094-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 --- 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 898b743..e0b9e4e 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 056beb9..26c638f 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