Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gn build] Port win asan runtime rules #108293

Merged
merged 1 commit into from
Sep 12, 2024
Merged

[gn build] Port win asan runtime rules #108293

merged 1 commit into from
Sep 12, 2024

Conversation

aeubanks
Copy link
Contributor

Windows doesn't have a static runtime after #107899.

Windows doesn't have a static runtime after llvm#107899.
@aeubanks aeubanks requested a review from nico September 11, 2024 21:09
Copy link
Contributor

@nico nico left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See also 4a63d62 and 4d55f0b

I noticed that 53a81d4 passed /MD instead of /MT for a bunch of cflags and/or ldflags. I think we don't do that part in GN yet.

@aeubanks aeubanks merged commit bea2f25 into llvm:main Sep 12, 2024
9 checks passed
@aeubanks aeubanks deleted the gnwinasan branch September 12, 2024 17:11
@aeubanks
Copy link
Contributor Author

hmm I'm not seeing where the /MD//MT are. is that CMAKE_MSVC_RUNTIME_LIBRARY?

@nico
Copy link
Contributor

nico commented Sep 13, 2024

Right, see here:

53a81d4#diff-e07727916fd4838a70b92fe6a62b5c6b52b8db246579951b16498628091e05c1R105

if(MSVC)
  # asan on windows only supports the release dll version of the runtimes, in the interest of
  # only having one asan dll to support/test. Having asan statically linked
  # with the runtime might be possible, but it multiplies the number of scenerios to test.
  # the program USING sanitizers can use whatever version of the runtime it wants to.
  set(CMAKE_MSVC_RUNTIME_LIBRARY MultiThreadedDLL)
endif()

@nico
Copy link
Contributor

nico commented Sep 13, 2024

(...and ctrl-f "CMAKE_MSVC_RUNTIME_LIBRARY" for other instances in that diff.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants