facebook / buck

A fast build system that encourages the creation of small, reusable modules over a variety of platforms and languages.
https://buck.build
Apache License 2.0
8.56k stars 1.16k forks source link

argsfile has wrong prefix when invoking gcc on Windows #2569

Open OleksiyA opened 3 years ago

OleksiyA commented 3 years ago

Hi,

My project uses Gnu Arm toolchain to build code for a microcontroller using buck. cxx.cxxpp, cxx.cxx and other cxx options are overridden in .buckconfig to point to a corresponding executables of the toolchain. The project compiles fine on OSX, I have issue while compiling on Windows 10.

While building a c library I see that compiler arguments file has wrong prefix:

command: [C:\x-tools\gcc-arm-none-eabi-9-2020-q2-update-win32\bin\arm-none-eabi-gcc.exe, @\\?\C:\Users\mhtly_000\sources\TestPrj\buck-out\bin\third_party\CMSIS\AmbiqMicro\Apollo3#compile-system_apollo3.c.obj68aa5103,default\ppandcompile.argsfile]

stderr: arm-none-eabi-gcc.exe: error: @\\?\C:\Users\mhtly_000\sources\TestPrj\buck-out\bin\third_party\CMSIS\AmbiqMicro\Apollo3#compile-system_apollo3.c.obj68aa5103,default\ppandcompile.argsfile: Invalid argument

If I replace @\\?\ prefix with @ the compilation works fine for individual command in the command line.

Is there configuration option I might have missed or other way to fix this error?

Thanks.