From b326b6e19b4590a54841c9f62ceb00cef5e1ddbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Wed, 19 Jul 2023 12:00:53 +0900 Subject: [PATCH 1/2] Fix building the reproNative.vcxproj project This got broken in #74623. --- src/coreclr/nativeaot/Bootstrap/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/coreclr/nativeaot/Bootstrap/main.cpp b/src/coreclr/nativeaot/Bootstrap/main.cpp index 8115fc870c23e3..e65c24904c6034 100644 --- a/src/coreclr/nativeaot/Bootstrap/main.cpp +++ b/src/coreclr/nativeaot/Bootstrap/main.cpp @@ -2,7 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. #include + +#ifdef HAS_ADDRESS_SANITIZER #include "minipal/utils.h" +#endif // // This is the mechanism whereby multiple linked modules contribute their global data for initialization at @@ -219,11 +222,14 @@ int main(int argc, char* argv[]) return __managed__Main(argc, argv); } +#ifdef HAS_ADDRESS_SANITIZER // We need to build the bootstrapper as a single object file, to ensure // the linker can detect that we have ASAN components early enough in the build. // Include our asan support sources for executable projects here to ensure they // are compiled into the bootstrapper object. #include "minipal/asansupport.cpp" +#endif // HAS_ADDRESS_SANITIZER + #endif // !NATIVEAOT_DLL #ifdef NATIVEAOT_DLL From ca4bc7f6f868ac91595fda1fa2a5d71c19393f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Wed, 19 Jul 2023 14:58:01 +0900 Subject: [PATCH 2/2] Update main.cpp --- src/coreclr/nativeaot/Bootstrap/main.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/coreclr/nativeaot/Bootstrap/main.cpp b/src/coreclr/nativeaot/Bootstrap/main.cpp index e65c24904c6034..aaf3d55352b900 100644 --- a/src/coreclr/nativeaot/Bootstrap/main.cpp +++ b/src/coreclr/nativeaot/Bootstrap/main.cpp @@ -3,10 +3,6 @@ #include -#ifdef HAS_ADDRESS_SANITIZER -#include "minipal/utils.h" -#endif - // // This is the mechanism whereby multiple linked modules contribute their global data for initialization at // startup of the application.