summaryrefslogtreecommitdiff
path: root/.flake8
diff options
context:
space:
mode:
authorbecker33 <becker33@llnl.gov>2018-08-01 15:48:00 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2018-08-01 15:48:00 -0700
commitcd9691de5314fcfaf17d47a63264acef5716c0b6 (patch)
treec0ae182a8cafd384028f7ef0925f7118e4fdabb4 /.flake8
parent38062a8abc0124854a8c8b20b3a4dd4b41313b3e (diff)
downloadspack-cd9691de5314fcfaf17d47a63264acef5716c0b6.tar.gz
spack-cd9691de5314fcfaf17d47a63264acef5716c0b6.tar.bz2
spack-cd9691de5314fcfaf17d47a63264acef5716c0b6.tar.xz
spack-cd9691de5314fcfaf17d47a63264acef5716c0b6.zip
cc: package search paths come before dependency paths (#4692)
Spack currently prepends include paths, library paths, and rpaths to the compile line. This causes problems when a header or library in the package has the same name as one exported by one of its dependencies. The *dependency's* header will be preferred over the package's, which is not what most builds expect. This also breaks some of our production codes. This restores the original cc behavior (from *very* early Spack) of parsing compiler arguments out by type (`-L`, `-I`, `-Wl,-rpath`) and reconstituting the full command at the end. `<includes> <other_args> <library dirs> <rpaths>` This differs from the original behavior in one significant way, though: it *appends* the library arguments so that dependency libraries do not shadow those in the build. This is safe because semantics aren't affected by *interleaving* `-I`, `-L`, and `-Wl,-rpath` arguments with others, only with each other (so the order fo two `-L` args affects the search path, but we search for all libraries on the command line using the same search path). We preserve the following: 1. Any system directory in the paths will be listed last. 2. The root package's include/library/RPATH flags come before flags of the same type for any dependency. 3. Order will be preserved within flags passed by the build (except system paths, which are moved to be last) 4. Flags for dependencies will appear between the root flags and the system flags, and the flags for any dependency will come before those for *its* dependencies (this is for completeness -- we already guarantee this in `build_environment.py`)
Diffstat (limited to '.flake8')
0 files changed, 0 insertions, 0 deletions