Skip to content

Commit

Permalink
[compiler-rt][test] Add --large-address-aware link flag for MinGW
Browse files Browse the repository at this point in the history
The interception tests rely on the test binary being large address
aware. This has already been set for MSVC builds. Now we do the same for
MinGW.

This fixes the interception unit tests for i686-w64-windows-gnu target.

Differential Revision: https://reviews.llvm.org/D148996
  • Loading branch information
alvinhochun committed Apr 25, 2023
1 parent 571b94f commit 1194e6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler-rt/lib/interception/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ if(MSVC)
-Wl,-nodefaultlib:libcmt,-defaultlib:msvcrt,-defaultlib:oldnames
)
endif()
if(MINGW)
list(APPEND INTERCEPTION_TEST_LINK_FLAGS_COMMON
-Wl,--large-address-aware
)
endif()
list(APPEND INTERCEPTION_TEST_LINK_FLAGS_COMMON -g)

if(NOT MSVC)
Expand Down

0 comments on commit 1194e6f

Please sign in to comment.