Skip to content

Conversation

@jorickert
Copy link

@jorickert jorickert commented Feb 20, 2025

Untested on mac

kasper0406 and others added 2 commits November 23, 2024 01:34
There are two things that make running MLIR tests with ASan on a mac
tedious:

1. The `DYLD_INSERT_LIBRARIES` environment variable needs to be set to
point to `libclang_rt.asan_osx_dynamic.dylib`
2. Mac is wrapping Python, which means that the `DYLD_INSERT_LIBRARIES`
environment variable is not being respected in the Python tests. The
solution is to find and use a non-wrapped Python binary.

With the above two changes, ASan works out of the box on mac's by
setting the `-DLLVM_USE_SANITIZER=Address` cmake flag.

I have stolen most of the code in this PR from other LLVM projects. It
may be a good idea to reconcile it somewhere.
@jorickert jorickert merged commit 6bdce9c into bump_to_776476c2 Mar 13, 2025
4 checks passed
@jorickert jorickert deleted the bump_to_beff2bac branch March 13, 2025 10:24
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.

3 participants