diff options
| author | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-03-24 18:31:22 +0530 |
|---|---|---|
| committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2017-03-27 11:25:22 +0530 |
| commit | 14d0f381580222f4b4eac376f514fcfcfdb6ee4c (patch) | |
| tree | 5105ec03bd92fc4fc5dc528aaa6c886c572baec0 /mesonbuild/coredata.py | |
| parent | ff4b32741acb36e8b2cf3d83fe0d513ad5753e59 (diff) | |
| download | meson-14d0f381580222f4b4eac376f514fcfcfdb6ee4c.tar.gz | |
Try harder to use the C compiler for compiling asm
Use an ordered dict for the compiler dictionary and sort it according
to a priority order: fortran, c, c++, etc.
This also ensures that builds are reproducible because it would be
a toss-up whether a C or a C++ compiler would be used based on the
order in which compilers.items() would return items.
Closes https://github.com/mesonbuild/meson/issues/1370
Diffstat (limited to 'mesonbuild/coredata.py')
| -rw-r--r-- | mesonbuild/coredata.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py index 956221122..51eeafffe 100644 --- a/mesonbuild/coredata.py +++ b/mesonbuild/coredata.py @@ -14,6 +14,7 @@ import pickle, os, uuid from pathlib import PurePath +from collections import OrderedDict from .mesonlib import MesonException, commonpath from .mesonlib import default_libdir, default_libexecdir, default_prefix @@ -128,8 +129,8 @@ class CoreData: else: self.cross_file = None self.wrap_mode = options.wrap_mode - self.compilers = {} - self.cross_compilers = {} + self.compilers = OrderedDict() + self.cross_compilers = OrderedDict() self.deps = {} self.modules = {} # Only to print a warning if it changes between Meson invocations. |
