I recently started to use bazel on Windows and I happened to find the related thread below:
https://groups.google.com/forum/#!topic/bazel-discuss/t-ruQRMis8A
which suggests to create BUILD files for a whole new toolchain contained in an external repository, making me end up at this tutorial: https://github.com/bazelbuild/bazel/wiki/Building-with-a-custom-toolchain
Do I need to go all through this? I just want to make bazel to use my mingw compiler at
C:\mingw-dists\mingw-w64\x86_64-5.1.0-posix-seh-rt_v4-rev0\mingw64
Any help is appreciated. Thanks in advance!!!
Here are my changes:
462,467c462,467
< tool_path { name: "ar" path: "C:/tools/msys64/mingw64/bin/ar" }
< tool_path { name: "compat-ld" path: "C:/tools/msys64/mingw64/bin/ld" }
< tool_path { name: "cpp" path: "C:/tools/msys64/mingw64/bin/cpp" }
< tool_path { name: "dwp" path: "C:/tools/msys64/mingw64/bin/dwp" }
< tool_path { name: "gcc" path: "C:/tools/msys64/mingw64/bin/gcc" }
< cxx_flag: "-std=c++0x"
---
> tool_path { name: "ar" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/ar" }
> tool_path { name: "compat-ld" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/ld" }
> tool_path { name: "cpp" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/cpp" }
> tool_path { name: "dwp" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/dwp" }
> tool_path { name: "gcc" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/gcc" }
> cxx_flag: "-std=c++1y"
472,476c472,476
< cxx_builtin_include_directory: "C:/tools/msys64/mingw64/x86_64-w64-mingw32/include"
< tool_path { name: "gcov" path: "C:/tools/msys64/mingw64/bin/gcov" }
< tool_path { name: "ld" path: "C:/tools/msys64/mingw64/bin/ld" }
< tool_path { name: "nm" path: "C:/tools/msys64/mingw64/bin/nm" }
< tool_path { name: "objcopy" path: "C:/tools/msys64/mingw64/bin/objcopy" }
---
> cxx_builtin_include_directory: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/x86_64-w64-mingw32/include"
> tool_path { name: "gcov" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/gcov" }
> tool_path { name: "ld" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/ld" }
> tool_path { name: "nm" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/nm" }
> tool_path { name: "objcopy" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/objcopy" }
479,480c479,480
< tool_path { name: "objdump" path: "C:/tools/msys64/mingw64/bin/objdump" }
< tool_path { name: "strip" path: "C:/tools/msys64/mingw64/bin/strip" }
---
> tool_path { name: "objdump" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/objdump" }
> tool_path { name: "strip" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/strip" }
532,535c532,535
< tool_path { name: "ar" path: "C:/tools/msys64/usr/bin/ar" }
< tool_path { name: "compat-ld" path: "C:/tools/msys64/usr/bin/ld" }
< tool_path { name: "cpp" path: "C:/tools/msys64/usr/bin/cpp" }
< tool_path { name: "dwp" path: "C:/tools/msys64/usr/bin/dwp" }
---
> tool_path { name: "ar" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/ar" }
> tool_path { name: "compat-ld" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/ld" }
> tool_path { name: "cpp" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/cpp" }
> tool_path { name: "dwp" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/dwp" }
537c537
< tool_path { name: "gcc" path: "C:/tools/msys64/usr/bin/gcc" }
---
> tool_path { name: "gcc" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/gcc" }
544c544
< cxx_builtin_include_directory: "C:/tools/msys64/"
---
> cxx_builtin_include_directory: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/"
546,549c546,549
< tool_path { name: "gcov" path: "C:/tools/msys64/usr/bin/gcov" }
< tool_path { name: "ld" path: "C:/tools/msys64/usr/bin/ld" }
< tool_path { name: "nm" path: "C:/tools/msys64/usr/bin/nm" }
< tool_path { name: "objcopy" path: "C:/tools/msys64/usr/bin/objcopy" }
---
> tool_path { name: "gcov" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/gcov" }
> tool_path { name: "ld" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/ld" }
> tool_path { name: "nm" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/nm" }
> tool_path { name: "objcopy" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/objcopy" }
552,553c552,553
< tool_path { name: "objdump" path: "C:/tools/msys64/usr/bin/objdump" }
< tool_path { name: "strip" path: "C:/tools/msys64/usr/bin/strip" }
---
> tool_path { name: "objdump" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/objdump" }
> tool_path { name: "strip" path: "C:/mingw-dists/mingw-w64/x86_64-5.4.0-release-posix-seh-rt_v5-rev0/mingw64/bin/strip" }
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/c6074f32-d87a-45ee-bd52-9a1dcb537451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/df405bda-1649-46a2-aa12-53e074e8978a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/f6c186a3-f03c-45f8-9e36-88e1d7985e0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "bazel-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/bazel-discuss/6T-sTMt4DA4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/65af112c-14d8-49fd-aa84-4224e47eae4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/65af112c-14d8-49fd-aa84-4224e47eae4d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--https://github.com/thinlizzy/ - C++11 and C++14 open source wrappers and libraries for various purposes (XML, image, webserver... and even a MTG implementation)
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_HYNVV01j0CBaqWRKt5YF9nPpNJHEFtApyGh4HYCSJrCw%40mail.gmail.com.
that is great news!
i tried the procedure in your mail using bazel 0.10.0 RC5
I am getting an error as gcc command line includes windows-like options ( /W3 /WX /wd4005 /wd4068 /wd4244 /wd4267 /wd4800 /DNOMINMAX /DWIN32_LEAN_AND_MEAN /D_CRT_SECURE_NO_WARNINGS)
maybe your change is not included in RC5 yet? Any ideas?
which gives me MSVC_FLAGS when i compile using --compiler=mingw-gcc and then the mingw gcc fails.
Do you believe that it is a problem in the BUILD file from abseil or a bazel mingw problem?
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/68e21613-cfda-4816-9a35-37ed17c21feb%40googlegroups.com.