mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
removed static linking.
Signed-off-by: Pratik Mankawde <pmankawde@ripple.com>
This commit is contained in:
16
.github/scripts/strategy-matrix/generate.py
vendored
16
.github/scripts/strategy-matrix/generate.py
vendored
@@ -184,12 +184,12 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
|||||||
# Use default linker (bfd/ld) which is more lenient with mixed code models
|
# Use default linker (bfd/ld) which is more lenient with mixed code models
|
||||||
cmake_args += ' -Duse_mold=OFF -Duse_gold=OFF -Duse_lld=OFF'
|
cmake_args += ' -Duse_mold=OFF -Duse_gold=OFF -Duse_lld=OFF'
|
||||||
# Add linker flags for Sanitizers
|
# Add linker flags for Sanitizers
|
||||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="{linker_relocation_flags} -static-libasan -static-libtsan -static-libubsan -fsanitize=address,{sanitizers_flags}"'
|
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=address,{sanitizers_flags}"'
|
||||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="{linker_relocation_flags} -static-libasan -static-libtsan -static-libubsan -fsanitize=address,{sanitizers_flags}"'
|
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=address,{sanitizers_flags}"'
|
||||||
elif os['compiler_name'] == 'clang':
|
elif os['compiler_name'] == 'clang':
|
||||||
sanitizers_flags = f'{sanitizers_flags},signed-integer-overflow,unsigned-integer-overflow'
|
sanitizers_flags = f'{sanitizers_flags},signed-integer-overflow,unsigned-integer-overflow'
|
||||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,{sanitizers_flags} -static-libsan"'
|
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=address,{sanitizers_flags}"'
|
||||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,{sanitizers_flags} -static-libsan"'
|
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=address,{sanitizers_flags}"'
|
||||||
|
|
||||||
# Sanitizers recommend minimum of -O1 for reasonable performance
|
# Sanitizers recommend minimum of -O1 for reasonable performance
|
||||||
if "-O0" in cxx_flags:
|
if "-O0" in cxx_flags:
|
||||||
@@ -221,12 +221,12 @@ def generate_strategy_matrix(all: bool, config: Config) -> list:
|
|||||||
cxx_flags = cxx_flags.replace('-mcmodel=large', '-mcmodel=medium')
|
cxx_flags = cxx_flags.replace('-mcmodel=large', '-mcmodel=medium')
|
||||||
linker_relocation_flags = linker_relocation_flags.replace('-mcmodel=large', '-mcmodel=medium')
|
linker_relocation_flags = linker_relocation_flags.replace('-mcmodel=large', '-mcmodel=medium')
|
||||||
# Add linker flags for Sanitizers
|
# Add linker flags for Sanitizers
|
||||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="{linker_relocation_flags} -static-libasan -static-libtsan -static-libubsan -fsanitize=thread,{sanitizers_flags}"'
|
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=thread,{sanitizers_flags}"'
|
||||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="{linker_relocation_flags} -static-libasan -static-libtsan -static-libubsan -fsanitize=thread,{sanitizers_flags}"'
|
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="{linker_relocation_flags} -fsanitize=thread,{sanitizers_flags}"'
|
||||||
elif os['compiler_name'] == 'clang':
|
elif os['compiler_name'] == 'clang':
|
||||||
cxx_flags += ' -fsanitize-blacklist=$GITHUB_WORKSPACE/external/sanitizer-blacklist.txt'
|
cxx_flags += ' -fsanitize-blacklist=$GITHUB_WORKSPACE/external/sanitizer-blacklist.txt'
|
||||||
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread,{sanitizers_flags} -static-libsan"'
|
linker_flags += f' -DCMAKE_EXE_LINKER_FLAGS="-fsanitize=thread,{sanitizers_flags}"'
|
||||||
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=thread,{sanitizers_flags} -static-libsan"'
|
linker_flags += f' -DCMAKE_SHARED_LINKER_FLAGS="-fsanitize=thread,{sanitizers_flags}"'
|
||||||
|
|
||||||
# Note: We use $GITHUB_WORKSPACE environment variable which will be expanded by the shell
|
# Note: We use $GITHUB_WORKSPACE environment variable which will be expanded by the shell
|
||||||
# before CMake processes it. This ensures the compiler receives an absolute path.
|
# before CMake processes it. This ensures the compiler receives an absolute path.
|
||||||
|
|||||||
Reference in New Issue
Block a user