-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
build compiler on mingw #1540
Comments
We used to test building for mingw in the CI, but the mingw llvm packages were outdated for too long, and I was unable to build LLVM and libclang from source with mingw. This will eventually be solved by #853 |
i've gotten it to compile but is doesn't work in the console (exits with exit code 127) or gdb (exits with error code 0xc0000139 before main is even run); however it will open in cmd and git bash but it will segfault when i try to run the tests or compile anything. |
Yeah. At this point, only builds with msvc are supported. It would be nice to add mingw support before #853 is solved, but it was too hard to test, since the packages didn't have the latest llvm version, and building llvm from source didn't work. We're about to depend on LLVM 7.0.0 which is scheduled to be released this week. I'm guessing those packages won't be available in mingw for several months. |
if building llvm with mingw did not work because of timeouts we could fix this with |
huzzah! the problem was that zig was loading the wrong dll (dlls from qemu) instead of the ones from mingw. now i can work on that segfault... |
ok this is weird but the first time i run the compiler it segfaults but after that it starts giving proper error messages, then it will repeat this every time it gets further than it did last time. |
I wonder if that's trying to compute the compiler id. Try wiping |
that worked but now i have to rebuild because of reasons. |
it works!!! now i just need to run the test suite.... |
Here's an example to test libc detection:
|
no i mean which don't link to libc. as zig is now it doesn't support linking to libc on mingw so i can't run these tests. or is there a way to keep the test harness running if some tests fail? |
That covers most stuff without depending on libc. We could also add a flag to the main test command that would exclude libc stuff. |
does zig need to link to compiler-rt? or does it only link to libLLVM, libclang, and libLDD? |
It only links to libLLVM and libclang. LDD is source-embedded in zig and compiler rt is built lazily from zig source for the target. |
so i don't need libssp, libcxx, etc.? |
I'd be happy to look at a paste of errors that you're getting if you're having trouble. Zig only depends on a c++ compiler, libclang, and libllvm. |
it's not that i'm getting errors building zig, it's that i;m building the llvm 7 tool chain from scratch so i can use the most recent version on zig. i was having problems with getting compiler-rt to compile so i thought it best to ask if was actually needed. |
currently, elf format is chosen as the default on mingw if you built llvm from source. is there a way to change the default target? |
is zig tested regularly on mingw(-w64), or is it known to compile successfully there?
The text was updated successfully, but these errors were encountered: