Skip to content
Snippets Groups Projects
Commit 35c9a011 authored by Alessandro Di Federico's avatar Alessandro Di Federico
Browse files

Introduce compiler wrappers

For a long time orchestra has been struggling to make sure each
component was getting the C/C++ flags we wanted. Each build systems do
that differently. Morover, since we have certain "contradictory" options
for compile- and link-time, we have been having issues with build
systems building and linking in a single shot.

This commit radically solves this issue by introducing
`hard-flags-compiler-wrapper.py`, a wrapper script for compilers that:

1. Splits linking and compilation inspecting the command line.

2. Detects from environment variables which additional flags to
   pass. Depending on the name of the environment variable, the flag can
   be used only for a certain compiler (e.g., `clang`), only for a
   certain language (e.g., `cxx`) or only for a certain action (e.g.,
   "compile" vs "link").

This provides us the maximum flexibility and, since this new method is
"embedded" in the compiler, bypasses all the build systems
specific-issues.

Also, it significantly makes the description much more readable and
compact.
parent 00111b2d
No related branches found
No related tags found
Loading
Showing
with 44 additions and 55 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment