[v3,2/4] build: determine execution environment at config time
Checks
Commit Message
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 <roretzla@linux.microsoft.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
config/meson.build | 8 ++++++++
lib/eal/meson.build | 8 --------
2 files changed, 8 insertions(+), 8 deletions(-)
@@ -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')
@@ -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)