Skip to content

Abstract specialized Targets into generic Targets #62

Description

@coder137

Currently, BuildCC follows an explicit Target-Toolchain method
ex.

// Toolchains
Toolchain_gcc gcc;
Toolchain_arm_gcc arm_gcc;
Toolchain_msvc msvc;

// Specialized targets
ExecutableTarget_gcc gccTarget(gcc);
ExecutanleTarget_gcc armgccTarget(arm_gcc);
ExecutableTarget_msvc msvcTarget(msvc);

// TODO, Generic targets
ExecutableTarget_generic gccGeneric(gcc);
ExecutableTarget_generic armGeneric(arm_gcc);
ExecutableTarget_generic msvcGeneric(msvc);

This keeps only the Toolchain definitions explicit with the low-level details hidden from regular users

  • Update Toolchain with ID (GCC, MSVC, CLANG, etc for toolchain family-specific implementations)
  • Target Triple Architecture for Clang and GCC compilers
  • Create ExecutableTarget_generic with case based overrides
    • Detect host OS
    • Target file extension dependent on Toolchain Id, Target Type and Host OS
    • BuildCC argparse module contain AddCustomToolchain specifications for complete control through the command line
  • Identify other common Toolchain families and document their Executable and Library command line invocations.
    • GCC
    • MSVC
    • Clang
    • MinGW

Future Features

  • C++20 Modules

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions