Cross-building .EXE on Linux with ASAN support
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I have successfully built and installed a cross-compiler such that `/opt/clang-22.1.8/bin/clang -fuse-ld=lld -o hello.exe hello.c` works and runs on Windows. However adding `-fsanitize=address` does not work. I have also built the ASAN runtime and proceeded through dozens of rounds of: changing cmake options, library .def files, trampoline stubs, install paths, and so on.
However nothing seems to work.
The goal here is to compile under Linux, but run on Windows. Previously I used Dr Memory for address sanitization but this no longer works since the Dr Memory project is unmaintained.
I would like to run address sanitization using any means necessary, even if I have to buy a commercial tool.
The proviso is that my .EXE must build on Linux and run on Windows.
I am also willing to pay someone to get this to work. You can contact me on `echo qbvmtiffs@hnbjm.dpn | tr 'b-z' 'a-y'` Do not contact me if you have social-anxiety disorder and cannot talk on a voice call.
One of the projects I want to get built with asan is: github.com/paulsheer/ming64x, but there are others.
(I have been programming in C/C++ for decades. It's my career.)
Contributor guide
Research direction
Start by reproducing the `/opt/clang-22.1.8/bin/clang -fuse-ld=lld -fsanitize=address` cross-build and compare it with the working `hello.exe` command. Review the ASAN runtime build, CMake options, `.def` files, trampoline stubs, and install paths described in the report, then test with `github.com/paulsheer/ming64x`. Done means a Linux-built Windows `.EXE` runs successfully with address sanitization.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, cpp
- Domain
- build-system, compilers, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100