From 505c5821d6d4849cb793584a7775ded24c791590 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 25 Oct 2023 10:29:44 +0200 Subject: [PATCH] small steps to getting ASAN on Windows working Change-Id: Ie8941a7cc87cb5c5dba62e9356e960e45f5560d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158416 Tested-by: Jenkins Reviewed-by: Noel Grandin --- setup_native/Library_inst_msu_msi.mk | 1 + setup_native/Library_instooofiltmsi.mk | 1 + setup_native/Library_qslnkmsi.mk | 1 + setup_native/Library_reg4allmsdoc.mk | 1 + setup_native/Library_reg_dlls.mk | 1 + setup_native/Library_regactivex.mk | 1 + setup_native/Library_sdqsmsi.mk | 1 + setup_native/Library_sellangmsi.mk | 1 + setup_native/Library_shlxtmsi.mk | 1 + setup_native/Library_sn_tools.mk | 1 + setup_native/StaticLibrary_quickstarter.mk | 1 + setup_native/StaticLibrary_seterror.mk | 1 + 12 files changed, 12 insertions(+) diff --git a/setup_native/Library_inst_msu_msi.mk b/setup_native/Library_inst_msu_msi.mk index d423b5168697..1a6646f2fa30 100644 --- a/setup_native/Library_inst_msu_msi.mk +++ b/setup_native/Library_inst_msu_msi.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,inst_msu_msi,\ $(eval $(call gb_Library_add_cxxflags,inst_msu_msi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,inst_msu_msi,\ diff --git a/setup_native/Library_instooofiltmsi.mk b/setup_native/Library_instooofiltmsi.mk index 36e2e2a6b81c..785fda3f35e6 100644 --- a/setup_native/Library_instooofiltmsi.mk +++ b/setup_native/Library_instooofiltmsi.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,instooofiltmsi,\ $(eval $(call gb_Library_add_cxxflags,instooofiltmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,instooofiltmsi,\ diff --git a/setup_native/Library_qslnkmsi.mk b/setup_native/Library_qslnkmsi.mk index f958534f07b1..f2246a1b6395 100644 --- a/setup_native/Library_qslnkmsi.mk +++ b/setup_native/Library_qslnkmsi.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,qslnkmsi,\ $(eval $(call gb_Library_add_cxxflags,qslnkmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,qslnkmsi,\ diff --git a/setup_native/Library_reg4allmsdoc.mk b/setup_native/Library_reg4allmsdoc.mk index 816ebbb3f06a..0e67147dfe49 100644 --- a/setup_native/Library_reg4allmsdoc.mk +++ b/setup_native/Library_reg4allmsdoc.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,reg4allmsdoc,\ $(eval $(call gb_Library_add_cxxflags,reg4allmsdoc,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,reg4allmsdoc,\ diff --git a/setup_native/Library_reg_dlls.mk b/setup_native/Library_reg_dlls.mk index f0ac9a875c60..d4decdcce2a4 100644 --- a/setup_native/Library_reg_dlls.mk +++ b/setup_native/Library_reg_dlls.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,reg_dlls,\ $(eval $(call gb_Library_add_cxxflags,reg_dlls,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,reg_dlls,\ diff --git a/setup_native/Library_regactivex.mk b/setup_native/Library_regactivex.mk index 7142b8ee0a7d..0789da0dbd03 100644 --- a/setup_native/Library_regactivex.mk +++ b/setup_native/Library_regactivex.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,regactivex,\ $(eval $(call gb_Library_add_cxxflags,regactivex,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,regactivex,\ diff --git a/setup_native/Library_sdqsmsi.mk b/setup_native/Library_sdqsmsi.mk index ff9a1bd586a7..bc769c65b85c 100644 --- a/setup_native/Library_sdqsmsi.mk +++ b/setup_native/Library_sdqsmsi.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,sdqsmsi,\ $(eval $(call gb_Library_add_cxxflags,sdqsmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,sdqsmsi,\ diff --git a/setup_native/Library_sellangmsi.mk b/setup_native/Library_sellangmsi.mk index 04f8f6edbc46..962ebf7639c0 100644 --- a/setup_native/Library_sellangmsi.mk +++ b/setup_native/Library_sellangmsi.mk @@ -19,6 +19,7 @@ $(eval $(call gb_Library_add_defs,sellangmsi,\ $(eval $(call gb_Library_add_cxxflags,sellangmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,sellangmsi,\ diff --git a/setup_native/Library_shlxtmsi.mk b/setup_native/Library_shlxtmsi.mk index bea522c62a3a..63488e79a989 100644 --- a/setup_native/Library_shlxtmsi.mk +++ b/setup_native/Library_shlxtmsi.mk @@ -17,6 +17,7 @@ $(eval $(call gb_Library_add_defs,shlxtmsi,\ $(eval $(call gb_Library_add_cxxflags,shlxtmsi,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,shlxtmsi,\ diff --git a/setup_native/Library_sn_tools.mk b/setup_native/Library_sn_tools.mk index aa94f2ebcf02..061cdbad37f1 100644 --- a/setup_native/Library_sn_tools.mk +++ b/setup_native/Library_sn_tools.mk @@ -15,6 +15,7 @@ $(eval $(call gb_Library_add_defs,sn_tools,\ $(eval $(call gb_Library_add_cxxflags,sn_tools,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_Library_add_ldflags,sn_tools,\ diff --git a/setup_native/StaticLibrary_quickstarter.mk b/setup_native/StaticLibrary_quickstarter.mk index 0517a7511016..1bb0c5405c0c 100644 --- a/setup_native/StaticLibrary_quickstarter.mk +++ b/setup_native/StaticLibrary_quickstarter.mk @@ -15,6 +15,7 @@ $(eval $(call gb_StaticLibrary_add_defs,quickstarter,\ $(eval $(call gb_StaticLibrary_add_cxxflags,quickstarter,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_StaticLibrary_add_exception_objects,quickstarter,\ diff --git a/setup_native/StaticLibrary_seterror.mk b/setup_native/StaticLibrary_seterror.mk index 92297690419b..c6fdb80c9889 100644 --- a/setup_native/StaticLibrary_seterror.mk +++ b/setup_native/StaticLibrary_seterror.mk @@ -15,6 +15,7 @@ $(eval $(call gb_StaticLibrary_add_defs,seterror,\ $(eval $(call gb_StaticLibrary_add_cxxflags,seterror,\ $(if $(MSVC_USE_DEBUG_RUNTIME),/MTd,/MT) \ + $(if $(filter -fsanitize=%,$(CC)),,/fno-sanitize-address-vcasan-lib) \ )) $(eval $(call gb_StaticLibrary_add_exception_objects,seterror,\