mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-02 17:06:00 +00:00
9
.github/scripts/strategy-matrix/generate.py
vendored
9
.github/scripts/strategy-matrix/generate.py
vendored
@@ -180,11 +180,12 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
||||
# shared_linker_flags += '-static-libubsan -static-libasan -static-libtsan'
|
||||
|
||||
if architecture['platform'] == 'linux/amd64':
|
||||
# Add -mcmodel=medium to both compiler AND linker flags
|
||||
# Add -mcmodel=medium and -fPIC to both compiler AND linker flags
|
||||
# This is needed because sanitizers create very large binaries
|
||||
cxx_flags += ' -mcmodel=medium'
|
||||
exe_linker_flags+='-mcmodel=medium'
|
||||
shared_linker_flags += '-mcmodel=medium'
|
||||
# -fPIC enables position independent code to avoid relocation range issues
|
||||
cxx_flags += ' -mcmodel=medium -fPIC'
|
||||
exe_linker_flags+='-mcmodel=medium -fPIC'
|
||||
shared_linker_flags += '-mcmodel=medium -fPIC'
|
||||
|
||||
if "-O0" in cxx_flags:
|
||||
cxx_flags = cxx_flags.replace("-O0", "-O1")
|
||||
|
||||
@@ -12,29 +12,29 @@ tools.info.package_ids:confs+=["user.package:sanitizers"]
|
||||
|
||||
{% if sanitizers == "Address" %}
|
||||
tools.build:cxxflags+=['-fsanitize=address,undefined,float-divide-by-zero,signed-integer-overflow
|
||||
-fno-omit-frame-pointer -fno-var-tracking-assignments -O1 -Wno-stringop-overflow -mcmodel=medium']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium']
|
||||
-fno-omit-frame-pointer -fno-var-tracking-assignments -O1 -Wno-stringop-overflow -mcmodel=medium -fPIC']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium -fPIC']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium -fPIC']
|
||||
{% elif sanitizers == "Thread" %}
|
||||
tools.build:cxxflags+=['-fsanitize=thread,undefined,float-divide-by-zero,signed-integer-overflow -fno-omit-frame-pointer
|
||||
-fno-var-tracking-assignments
|
||||
-O1 -Wno-stringop-overflow -Wno-tsan -mcmodel=medium']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium']
|
||||
-O1 -Wno-stringop-overflow -Wno-tsan -mcmodel=medium -fPIC']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium -fPIC']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium -fPIC']
|
||||
{% endif %}
|
||||
|
||||
{% elif compiler == "clang" %}
|
||||
|
||||
{% if sanitizers == "Address" %}
|
||||
tools.build:cxxflags+=['-fsanitize=address,undefined,float-divide-by-zero,signed-integer-overflow,unsigned-integer-overflow
|
||||
-fno-omit-frame-pointer -fno-var-tracking-assignments -O1 -mcmodel=medium']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium']
|
||||
-fno-omit-frame-pointer -fno-var-tracking-assignments -O1 -mcmodel=medium -fPIC']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium -fPIC']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium -fPIC']
|
||||
{% elif sanitizers == "Thread" %}
|
||||
tools.build:cxxflags+=['-fsanitize=thread,undefined,float-divide-by-zero,signed-integer-overflow,unsigned-integer-overflow
|
||||
-fno-omit-frame-pointer -fno-var-tracking-assignments -O1 -mcmodel=medium']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium']
|
||||
-fno-omit-frame-pointer -fno-var-tracking-assignments -O1 -mcmodel=medium -fPIC']
|
||||
tools.build:sharedlinkflags+=['-mcmodel=medium -fPIC']
|
||||
tools.build:exelinkflags+=['-mcmodel=medium -fPIC']
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user