rochus-keller / BUSY

BUSY is a lean, statically typed, cross-platform, easily bootstrappable build system for GCC, CLANG and MSVC inspired by Google GN
GNU General Public License v2.0
81 stars 6 forks source link

What if someone doesn't use `gcc`? #12

Closed ghost closed 1 year ago

ghost commented 1 year ago

I want to use Pelles C to build my code. How could I specify the compiler? It seems gcc is assumed and only gcc is supported.

p/s: I want to build my code with Pelles C. I don't want to build BUSY itself with Pelles C. Let's make it clear.

rochus-keller commented 1 year ago

BUSY currently supports GCC, CLANG and MSVC; CLANG support on Windows is restricted.

I never heard of Pelles C so far, but if it has a way to look compatible to MSVC or GCC then it might work with BUSY.

ghost commented 1 year ago

CLANG support on Windows is restricted.

Could you elaborate more?

I never heard of Pelles C so far, but if it has a way to look compatible to MSVC or GCC then it might work with BUSY.

There is an unofficial project on Github that provides wrapper for Pelles C to make it look like GCC:

https://github.com/rofl0r/pellescc

The problem is the binary name is not gcc. With other build systems I could specify CC=pellescc AR=pellesar on the command line or even have a way to set that in the build script. So far, I don't see any way to do this with BUSY.

rochus-keller commented 1 year ago

Could you elaborate more?

From https://github.com/rochus-keller/leancreator/: "Clang on Windows seems to work, but there are tons of compiler errors when compiling LeanQt. "

The problem is the binary name is not gcc.

Not really a problem; just make an alias or copy and call it gcc. You can also use the "target_toolchain_prefix" predeclared variable of BUSY (see manual).

ghost commented 1 year ago

Btw, the Pelles C's GCC wrapper is too limited. I want to use Pelles C directly. CMake offers a way for me to extend it to add unsupported compilers. How could I add an unsupported compiler to BUSY?

rochus-keller commented 1 year ago

There is no such feature (yet) in BUSY.

What is that much better in Pelles C than CLANG or GCC that you want to use it?

ghost commented 1 year ago

What is that much better in Pelles C than CLANG or GCC that you want to use it?

Pelles C has excellent document and I'm already familiar with the toolchain.

rochus-keller commented 1 year ago

Ok, I see. Unfortunately I cannot support other toolchains for the moment, so I recommend that you continue with Cmake for now.