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 DA43D429D8; Tue, 25 Apr 2023 22:08:51 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B44E7410D0; Tue, 25 Apr 2023 22:08:51 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id DE041410D0 for ; Tue, 25 Apr 2023 22:08:50 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 4165621C2B2D; Tue, 25 Apr 2023 13:08:50 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 4165621C2B2D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1682453330; bh=lcnuoYBlxjgHBL6G0UBKvVM6Pb0OUwBtrQm0YiYsaI8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mHpAPzQiR2RZfb/RNdPO4IhGXZ40sMupWfae7zywX/uVijQDD5icT1yITt3u2eMAk c2OG0BYSHLf6i6BVSvJ1Ssy3ddI+36meerdfXAGFwVL4wJWrC+eZR8EntOzuuf/5cJ 7Vpbw9zWnwB0jLEJmKMIEDhOlbX5E6UfJp4lQKaw= From: Tyler Retzlaff To: dev@dpdk.org Cc: bruce.richardson@intel.com, david.marchand@redhat.com, thomas@monjalon.net, Tyler Retzlaff Subject: [PATCH v3 2/4] build: determine execution environment at config time Date: Tue, 25 Apr 2023 13:08:47 -0700 Message-Id: <1682453329-20435-3-git-send-email-roretzla@linux.microsoft.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1682453329-20435-1-git-send-email-roretzla@linux.microsoft.com> References: <1674674707-3094-1-git-send-email-roretzla@linux.microsoft.com> <1682453329-20435-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 9a3f499..d2b12db 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 9aa941a..d5eeb07 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