Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions site_scons/prereq_tools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ def __init__(self, env, opts):
['warning', 'warn', 'error'], ignorecase=2))
opts.Add(('SANITIZERS', 'Instrument C code with google sanitizers', None))
opts.Add(BoolVariable('CMOCKA_FILTER_SUPPORTED', 'Allows to filter cmocka tests', False))
opts.Add(BoolVariable('CRT_PP', 'Preprocess CaRT sources', False))

opts.Update(self.__env)

Expand Down
29 changes: 17 additions & 12 deletions src/cart/SConscript
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# (C) Copyright 2016-2022 Intel Corporation.
# (C) Copyright 2026 Hewlett Packard Enterprise Development LP
#
# SPDX-License-Identifier: BSD-2-Clause-Patent
#
Expand Down Expand Up @@ -75,18 +76,22 @@ def scons():

cart_targets = denv.SharedObject(SRC)

compiler = env.get('COMPILER').lower()
if compiler != 'covc':
pp_env = denv.Clone()
pp_files = []
for src in SRC:
# Some day, the preprocess builder should be fixed so it can do multiple commands
# in parallel but until then, just submit them one at a time
pp_files.extend(pp_env.Preprocess(src))
parsed_files = parse_pp(pp_env, pp_files)
header = consolidate_pp(pp_env, parsed_files)

Depends(cart_targets, header)
# Preprocess the CaRT sources if CRT_PP is set to True
crt_pp = env.get('CRT_PP')
if crt_pp:
print("Warning: Preprocessing of CaRT sources is enabled")
compiler = env.get('COMPILER').lower()
if compiler != 'covc':
pp_env = denv.Clone()
pp_files = []
for src in SRC:
# Some day, the preprocess builder should be fixed so it can do multiple commands
# in parallel but until then, just submit them one at a time
pp_files.extend(pp_env.Preprocess(src))
parsed_files = parse_pp(pp_env, pp_files)
header = consolidate_pp(pp_env, parsed_files)

Depends(cart_targets, header)

cart_lib = denv.d_library('cart', [cart_targets, swim_targets], SHLIBVERSION=CART_VERSION)
denv.InstallVersionedLib('$PREFIX/lib64/', cart_lib, SHLIBVERSION=CART_VERSION)
Expand Down
Loading