diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5847878d389..90748f660cc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -60,7 +60,7 @@ jobs: - compiler: clang++-18 standard: 23 mode: release - cooks: --cook dpdk + options: --cook dpdk --dpdk-machine haswell enables: --enable-dpdk - compiler: clang++-18 standard: 23 @@ -69,7 +69,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: "${{ contains(matrix.cooks, 'dpdk') }}" + submodules: "${{ contains(matrix.enables, 'dpdk') }}" - name: Install build dependencies run: | @@ -98,7 +98,7 @@ jobs: --compiler $CXX --c-compiler $CC --mode ${{ matrix.mode }} - ${{ matrix.cooks }} + ${{ matrix.options }} ${{ matrix.enables }} ; - name: Build diff --git a/configure.py b/configure.py index 3e67bcb7232..c1fba65ad13 100755 --- a/configure.py +++ b/configure.py @@ -139,6 +139,7 @@ def standard_supported(standard, compiler='g++'): arg_parser.add_argument('--compile-commands-json', dest='cc_json', action='store_true', help='Generate a compile_commands.json file for integration with clangd and other tools.') arg_parser.add_argument('--heap-profiling', dest='heap_profiling', action='store_true', default=False, help='Enable heap profiling') +arg_parser.add_argument('--dpdk-machine', default='native', help='Specify the target architecture') add_tristate(arg_parser, name='deferred-action-require-noexcept', dest='deferred_action_require_noexcept', help='noexcept requirement for deferred actions', default=True) arg_parser.add_argument('--prefix', dest='install_prefix', default='/usr/local', help='Root installation path of Seastar files') args = arg_parser.parse_args() @@ -163,32 +164,6 @@ def identify_best_standard(cpp_standards, compiler): args.cpp_standard = identify_best_standard(cpp_standards, compiler=args.cxx) -def infer_dpdk_machine(user_cflags): - """Infer the DPDK machine identifier (e.g., 'ivb') from the space-separated - string of user cflags by scraping the value of `-march` if it is present. - - The default if no architecture is indicated is 'native'. - """ - arch = 'native' - - # `-march` may be repeated, and we want the last one. - # strip features, leave only the arch: armv8-a+crc+crypto -> armv8-a - for flag in user_cflags.split(): - if flag.startswith('-march'): - arch = flag[7:].split('+')[0] - - MAPPING = { - 'native': 'native', - 'nehalem': 'nhm', - 'westmere': 'wsm', - 'sandybridge': 'snb', - 'ivybridge': 'ivb', - 'armv8-a': 'armv8a', - } - - return MAPPING.get(arch, 'native') - - MODES = seastar_cmake.SUPPORTED_MODES if args.mode == 'all' else [args.mode] # For convenience. @@ -223,7 +198,7 @@ def configure_mode(mode): tr(LDFLAGS, 'LD_FLAGS'), tr(args.cxx_modules, 'MODULE'), tr(args.dpdk, 'DPDK'), - tr(infer_dpdk_machine(args.user_cflags), 'DPDK_MACHINE'), + tr(args.dpdk_machine, 'DPDK_MACHINE'), tr(args.hwloc, 'HWLOC', value_when_none='yes'), tr(args.io_uring, 'IO_URING', value_when_none=None), tr(args.alloc_failure_injection, 'ALLOC_FAILURE_INJECTION', value_when_none='DEFAULT'),