From 8a26ac855eeb8cc3e878cb927fdbe405e8806c61 Mon Sep 17 00:00:00 2001 From: Mateusz Masiarz Date: Sat, 10 Feb 2024 21:41:03 +0100 Subject: [PATCH] Remove fsanitize in weak flags (#178) * Remove fsanitize with weak compilation flags * Bump version --- src/sinol_make/__init__.py | 2 +- src/sinol_make/helpers/compile.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sinol_make/__init__.py b/src/sinol_make/__init__.py index af2a9cc0..c7511fe8 100644 --- a/src/sinol_make/__init__.py +++ b/src/sinol_make/__init__.py @@ -9,7 +9,7 @@ from sinol_make import util, oiejq -__version__ = "1.5.21" +__version__ = "1.5.22" def configure_parsers(): diff --git a/src/sinol_make/helpers/compile.py b/src/sinol_make/helpers/compile.py index d4a8b115..b4435b8f 100644 --- a/src/sinol_make/helpers/compile.py +++ b/src/sinol_make/helpers/compile.py @@ -66,13 +66,13 @@ def compile(program, output, compilers: Compilers = None, compile_log = None, we arguments = [compilers.cpp_compiler_path or compiler.get_cpp_compiler_path(), program] + \ extra_compilation_args + ['-o', output] + \ f'--std=c++20 -O3 -lm{gcc_compilation_flags} -fdiagnostics-color'.split(' ') - if use_fsanitize: + if use_fsanitize and not weak_compilation_flags: arguments += ['-fsanitize=address,undefined', '-fno-sanitize-recover'] elif ext == '.c': arguments = [compilers.c_compiler_path or compiler.get_c_compiler_path(), program] + \ extra_compilation_args + ['-o', output] + \ f'--std=gnu99 -O3 -lm{gcc_compilation_flags} -fdiagnostics-color'.split(' ') - if use_fsanitize: + if use_fsanitize and not weak_compilation_flags: arguments += ['-fsanitize=address,undefined', '-fno-sanitize-recover'] elif ext == '.py': if sys.platform == 'win32' or sys.platform == 'cygwin':