KeyWorksRW / ttBld

Creates a makefile and Ninja build scripts from a simple YAML file (.srcfiles.yaml)
Other
2 stars 0 forks source link

Need two variants of clang ninja scripts #223

Open KeyWorksRW opened 4 years ago

KeyWorksRW commented 4 years ago

Description:

We need to rework the ninja script compiler naming scheme. We need to create scripts for 4 compilers:

Because we now have platform-specific versions of .srcfiles, we don't actually need multiple flags. The normal CFlags options will be for the default compiler for the specific platform, and the CLANG flags will be for any additional flags when running either clang-cl.exe (using .srcfiles.win.yaml) or clang.exe (using .srcfiles.max.yaml or .srcfiles.unix.yaml).

What we DO need are compiler-specific .ninja scripts, and that means one for clang-cl.exe and another one for clang.exe.

Randalphwa commented 4 years ago

Once complete, we also need to change makefile generation -- the make.exe section needs to be changed to:

ifndef cmplr
    ifeq ($(OS),Windows_NT)
            cmplr=clang-cl
    else
        cmplr=clang
    endif
endif

This makes both variants of clang the default when running mingw32-make.exe, gmake.exe, or make.exe, and of course msvc when running nmake.