Commit Graph

408 Commits

Author SHA1 Message Date
Dylan Baker 5a83cb0d33 Fix detection of D linker in MSVC environments
Rather than trying to figure out if we're using MSVC based on
environment variables, then trying to get the C compiler and test some
attributes, get the C compiler and see if it's MSVC. This is much more
reliable and we were already doing it anyway.
2019-12-02 13:39:37 -08:00
Luca Bacci 2362bdbbf9 Fix regular expression for MSVC target arch detection
Make it work regardless of MSVC output language

Fixes #6128
See PR #6265
2019-11-30 21:52:58 +02:00
Eric Le Bihan 815563841a Fix cross-compilation of D programs
Since version 9.1, GCC provides support for the D programming language. Thus it
is easy to build a cross-compiler for D, such as aarch64-unknown-linux-gnu-gdc.

However to cross-compile a Meson project using D, using a cross build definition
such as the following is not enough:

```
[binaries]
d = '/path/to/aarch64-unknown-linux-gnu-gdc'
exe_wrapper = '/path/to/qemu-aarch64-static'

[properties]
needs_exe_wrapper = true

[host_machine]
system = 'linux'
cpu_family = 'aarch64'
cpu = 'cortex-a53'
endian = 'little'
```

Indeed, "exe_wrapper" is not be taken into account. Build will fail with:

```
Executables created by D compiler /path/to/aarch64-uknown-linux-gnu-gdc are not runnable.
```

This patch fixes this by reworking:

- detect_d_compiler() to properly get exe_wrapper and D compilers and detect the
one available.
- Dcompiler to properly handle exe_wrapper.
2019-11-19 16:32:12 +02:00
Jan Tojnar 3a050093a4 environment: Only check compiler basename for compiler name
Nix uses absolute paths to compilers in Nix store with Meson.
Those store paths contain a hash, which can contain short strings
like icl, resulting in incorrectly matching the compiler.

https://github.com/NixOS/nixpkgs/issues/73417#issuecomment-554077964
2019-11-16 21:30:36 +02:00
Luca Bacci ad20067ed2 Raise an exception if we cannot detect the MSVC compiler target architecture 2019-11-12 20:31:37 +02:00
Wolfgang Stöggl f037e7ef45 Fix typos found by codespell
- Typos were found by codespell v1.16.0
2019-11-06 09:55:30 -05:00
Jussi Pakkanen f5c8893281
Merge pull request #6123 from scivision/bugfix-fortran
bugfix: fortran compiler assertionerror from 0c22798
2019-11-02 23:35:38 +02:00
Aleksey Gurtovoy 48e6db89ab Ask Ninja to expand rsp files in compile_commands.json 2019-11-02 16:16:09 +02:00
Michael Hirsch, Ph.D 50225c14e2
fix PGI Windows 'ar' linker 2019-10-31 23:53:47 -04:00
Michael Hirsch, Ph.D 9c1bab67af
bugfix: fortran compiler assertionerror from 0c22798 2019-10-31 23:22:37 -04:00
GoaLitiuM 4f83c47880 d: Prefer MSVC and LLVM linker over optlink when available
The optlink linker is slowly getting phased out now since DMD ships with the LLVM linker, so it can be used when Visual Studio is not installed.
2019-10-21 16:22:39 +03:00
Matt Turner 7685d49b04 environment: Add missing space between words 2019-10-15 21:47:58 +03:00
Dylan Baker b268327166 environment: Fix detection of xild with icc 2019-10-14 08:26:57 -07:00
Michael Hirsch, Ph.D 17f766105f intel-cl: correct argument order 2019-10-10 10:00:28 -07:00
Michael Hirsch, Ph.D 508662f277 BUGFIX: environment.py CudaCompiler missing info arg
fixes regression for systems with nvcc installed--perhaps why not previously caught on CI.
Just a simple typo--missing a positional argument to CudaCompiler()

0c22798b1a is the first bad commit File
  "meson\mesonbuild\environment.py", line 1066, in detect_cuda_compiler
    return CudaCompiler(ccache + compiler, version, for_machine, is_cross, exe_wrap, host_compiler=cpp_compiler,
    linker=linker)# Please enter the commit message for your changes. Lines starting
TypeError: __init__() missing 1 required positional argument: 'info'# with '#' will be ignored, and an empty message aborts the commit.
2019-10-10 10:00:28 -07:00
Jussi Pakkanen b6af3f3810
Merge pull request #5833 from dcbaker/remove-compiler-type
Remove compiler type
2019-10-09 19:53:56 +03:00
Dylan Baker 65fc4149c5 environment: Detect sun4u and sun4v as sparc64
Solaris returns these values.

Fixes #6006
2019-10-09 19:49:57 +03:00
Dylan Baker afbed79baa compilers: replace uses of mesonlib.is_<os>() with self.info.is_<os>()
Since these are cross compilation safe, while the former is not.
2019-10-07 12:08:20 -07:00
Dylan Baker 0c22798b1a compilers: replace CompilerType with MachineInfo
Now that the linkers are split out of the compilers this enum is
only used to know what platform we're compiling for. Which is
what the MachineInfo class is for
2019-10-07 12:08:20 -07:00
Dylan Baker ff4a17dbef compilers: Add a specific type for AppleClangC
This allows us to detect use classes rather than methods to determine
what C standards are available.
2019-10-07 10:44:56 -07:00
Jussi Pakkanen 0b4d1e8afd Cross build is defined by the existance of a cross file. 2019-10-06 17:46:16 +03:00
Olexa Bilaniuk 2057ffccc3 Correct obviously-wrong test for gold linker. 2019-09-30 20:54:08 +03:00
Ting-Wei Lan 24bd029437 environment: LLVM 9 is now a stable release 2019-09-29 00:11:16 +08:00
Ting-Wei Lan 0390b673f1 Find clang-format with alternative names
This is similar to what we currently do for scan-build except there is
no environment variable to choose a specific clang-format to run. If an
environment variable is needed for better control, we can add it later.
2019-09-29 00:11:15 +08:00
Ting-Wei Lan 08ce1fb541 Move the list of LLVM version suffixes to a common place
Both scan-build and llvm-config need the same list of LLVM version
suffixes. It is better to keep the list at a common place instead of
having several copies in different files, which is likely to become
out-of-sync when the list is updated.
2019-09-29 00:11:13 +08:00
Andrei Alexeyev 3fd460bce7 Fix GNU-like LLD being misdetected as MSVC-like LLD
Affects the latest version of the llvm-mingw toolchain
2019-09-27 08:20:07 -07:00
Ting-Wei Lan 74d5136e59 environment: Don't make special case for scan-build on Linux
Versioning of executables is not related to the operating system kernel.
It is possible for a Linux distribution to support multiple versions of
LLVM in a way similar to FreeBSD. For example, on Debian, you can use
'apt install clang-tools-7' to install the versioned 'scan-build-7'
executable without bringing the unversioned 'scan-build' into the
environment. Therefore, we should not skip the version list on Linux.
It also makes it consistent with the behavior of llvm dependency, which
does not change the search list depending on the operating system.

This commit also fixes the version suffix for Debian. Debian stops using
the minor version number on the executable after version 7, so it should
be 'scan-build-7', not 'scan-build-7.0'.

This is a follow-up of https://github.com/mesonbuild/meson/pull/5918.
2019-09-25 22:52:19 +03:00
Aleksey Gurtovoy 6ac5db50c9 CUDA support on Windows 2019-09-24 14:22:20 -07:00
Gabriel Ganne e7197895b2 uniform scan-build detection process
Detect scan-build the same way when trying to launch it and when
generating the target.
The detection method is:
  1. look within SCANBUILD env variable
  2. shutil.which('scan-build')
  3. *on non-linux platforms only*: go through all the possible
     name candidates and test them individually.

The third step is added following this comment
https://github.com/mesonbuild/meson/pull/5857#issuecomment-528305788
However, going through a list of all the possible candidates is neither
easily maintainable nor performant, and is therefore skipped on
platforms that should not require such a step (currently, only Linux
platforms).

This is a follow-up to the issue raised by @lantw44 during PR:
https://github.com/mesonbuild/meson/pull/5857
2019-09-14 05:51:36 +03:00
Alan Coopersmith 3d74987c81 compilers: Recognize Solaris 11.4 linker
Solaris 11.3 & earlier sent the --version output to stderr, but
Solaris 11.4 moved it to stdout in an attempt to be more compatible
with the GNU tools, so look for it in both streams of output.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-09-10 22:43:34 -07:00
Andrei Alexeyev d768a76ab2 Workaround for mingw-llvm linker (lld) misdetection
llvm-mingw uses a wrapper script to inject (among other things) a
-target argument into the clang command, which breaks -Wl,--version.
This confuses Meson into thinking the linker is some unknown version of
Apple ld, which breaks builds.

This patch makes it detect and recover from the issue.

Fixes #5910
2019-09-10 13:23:22 -07:00
Dylan Baker 15f8165bde environment: merge successive is_windows blocks 2019-09-09 21:22:26 -07:00
Dylan Baker 52aba19b17 environment: gcc/g++ and clang/clang++ are valid objc/objc++ compilers to try 2019-09-09 21:22:26 -07:00
Alan Coopersmith e5a67b4248 If ar is unrecognized, try gar for GNU ar
Needed on Solaris, where native ar doesn't recognize all the flags
that meson uses, but GNU ar does.
2019-09-09 21:22:26 -07:00
Jussi Pakkanen d67d5411bb
Merge pull request #5823 from scivision/linker-pgi-linux
PGI compiler fixes
2019-09-05 23:45:54 +03:00
Aleksey Gurtovoy 75daed27bc mesonlib.split_args/quote_arg/join_args 2019-09-05 23:42:47 +03:00
Michael Hirsch, Ph.D c8d380e4ef
PGI: use ar link wrapper on Windows 2019-09-05 11:50:17 -04:00
Kramer Peace caec875fe1 Create CUDA linker with CUDA compiler
Since they are laways paired there is no need to "search" for the cuda
linker.
2019-09-05 08:38:56 -07:00
Kramer Peace fb9a5ce867 Add a CUDA linker object
Fixes issue #5870
2019-09-05 08:38:56 -07:00
Dylan Baker cf55cd5c92 environment: clang uses lld-link or link.exe on windows 2019-08-30 00:01:32 +03:00
Dylan Baker 0efab591da compilers: Move the compiler argument to proxy linker flags to the compiler class
Instead of the DynamicLinker returning a hardcoded value like
`-Wl,-foo`, it now is passed a value that could be '-Wl,', or could be
something '-Xlinker='

This makes a few things cleaner, and will make it possible to fix using
clang (not clang-cl) on windows, where it invokes either link.exe or
lld-link.exe instead of a gnu-ld compatible linker.
2019-08-30 00:01:32 +03:00
Nirbheek Chauhan a107eab294 environment: Fix detection of MSVC arch on arm64
The regex was incorrect, so it was matching 'ARM64' with 'ARM'.
Make the regex more specific so that it matches:

Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x64
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x86
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for ARM64
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86

etc.
2019-08-27 18:21:21 +03:00
nia 246b49fe75 Support NetBSD aarch64 and earm. 2019-08-23 13:10:25 -07:00
Dylan Baker 3fbb450166 environment: Detect dynamic linker class 2019-08-14 13:13:23 -07:00
Dylan Baker 29f351c05a environment: Handle OBJC[PP] clang detection like C[PP]
Which fixes using a non Apple clang for objc and objc++ on macOS.
2019-08-14 13:13:23 -07:00
Dylan Baker 1c455ee630 environment: Use a single function to check for ObjC and ObjC++
These two functions are different only in the classes that they use, a
couple of simple in-line ternaries takes care of that and reduces code
duplication.
2019-08-14 13:13:23 -07:00
Jussi Pakkanen f41bdae368 Add basic Webassembly support via Emscripten. 2019-08-05 19:31:32 +03:00
Jan Beich ddbf60f86d environment: simplify powerpc conditionals 2019-08-04 21:47:44 +03:00
Jan Beich 147d3f752c environment: simplify CPU logic via hw.machine_arch on BSDs 2019-08-04 21:47:44 +03:00
Michael Hirsch, Ph.D 7aecfb1540 remove unreachable code 2019-08-02 14:31:22 +03:00
Michael Hirsch, Ph.D 041de5814f BUGFIX: typo from 32e827dcdc broke PGI compilers 2019-07-06 00:26:59 +03:00
Charlie Barto 1e182b51c6 Improve performance with windows defender ATP 2019-07-05 21:59:15 +03:00
Michael Hirsch, Ph.D 838c8d642c BUGFIX: typo for PGI C/CPP 2019-06-24 14:06:32 -04:00
Michael Hirsch, Ph.D 5b109c9ad2 correct missing argument for IntelClFortranCompiler
ifort passes all tests

cleanup logic
2019-06-24 14:06:32 -04:00
Dylan Baker 56f7e5c74f coredata: Correctly handle receiving a pipe for native/cross files
* coredata: Correctly handle receiving a pipe for native/cross files

In some cases a cross/native file may be a pipe, such as when using bash
process replacement `meson --native-file
<([binaries]llvm-config='/opt/bin/llvm-config')`, for example. In this
case we copy the contents of the pipe into a file in the meson-private
directory so we can create a proper ninja dependency, and be able to
reload the file on --wipe/--reconfigure. This requires some extra
negotiation to preserve these native/cross files.

Fixes #5505

* run_unitests: Add a unit test for native files that are pipes

Using mkfifo.
2019-06-23 17:53:17 +03:00
Dylan Baker b972ee7125 environment: Fix detection of Microsoft cl.exe with non English locales
This uses the fix as suggested in issue 5491, which it also fixes.

Fixes #5491
2019-06-21 15:50:06 +03:00
Alan Coopersmith a35844c08d Canonicalize 'i86pc' return from platform.machine() for Solaris
i86pc may be either 32-bit or 64-bit, so use existing compiler checks
to determine if it should return 'x86' or 'x86_64'.

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2019-06-19 00:04:17 +03:00
Kurtis Rader e06f0e6aaf Solaris fixes
Fixes #5351
2019-06-12 14:14:57 +03:00
Dan Kegel b28e76f6bf environment: better xcode 11 clang detection
Fixes #5474
2019-06-11 10:13:50 -07:00
John Ericson 07777e15d4 Purge `is_cross` and friends without changing user interfaces
In most cases instead pass `for_machine`, the name of the relevant
machines (what compilers target, what targets run on, etc). This allows
us to use the cross code path in the native case, deduplicating the
code.

As one can see, environment got bigger as more information is kept
structured there, while ninjabackend got a smaller. Overall a few amount
of lines were added, but the hope is what's added is a lot simpler than
what's removed.
2019-06-09 13:13:25 -04:00
John Ericson 32e827dcdc Use `env.machines.*` to avoid some `is_cross`
This is a small example of the `is_cross` removal the that abstraction
enables.
2019-06-09 13:13:20 -04:00
Marcel Hollerbach d6407445b9 backend: refactor get_custom_target_provided_libraries
the problem here is, that get_custom_target_provided_libraries iterated
over all generated sources of a target. In each output we check if this
is a library or not. In projects like EFL we have added a lot of
generated target to many different targets, so the iterating of the
output is rather consistent, with this commit we drop from 19% of the
time spending in get_custom_target_provided_libraries down to 3.51%.
2019-06-03 20:37:27 +03:00
Jussi Pakkanen ef024583df
Merge pull request #5276 from dcbaker/pkg-config-path-invalidate-cache
coredata: add pkg_config_path to depedency cache key
2019-05-20 22:50:12 +03:00
Jon Turney fb35e6faac Remove compiler data from build object
The actual data is in Coredata (which is serialized) and we just held a
reference in Build for (in)convenience.
2019-05-20 11:29:17 -07:00
Dylan Baker 5df6823bd8 coredata: Introduce a class to act as the dependency cache
Handling the PKG_CONFIG_PATH variable in meson introduces a new problem
for caching dependencies. We want to encode the pkg_config_path (or
cross_pkg_config_path if we're cross compiling) to be part of the key,
but we don't want to put that into the key for non-pkg-config
dependencies to avoid spurious cache misses (since pkg_config_path isn't
relevant to cmake, for example). However, on a cache lookup we can't
know that a dependency is a pkg-config dependency until we've looked in
the cache.

My solution is a two layer cache, the first layer remains the same as
before, the second layer is a dict-like object that encapsulates the
dependency type information and uses pkg_config_path and
cross_pkg_config_path as a sub key (and could be extended easily for
other types). A new object type is introduced to encapsulate this so
that callers don't need to be aware of the implementation details.
2019-05-17 12:26:20 -07:00
Jussi Pakkanen 67a5af99aa
Merge pull request #5395 from dcbaker/mtest-annotations
Mtest annotations and bug fixes
2019-05-16 00:31:01 +03:00
John Ericson 957d8e051c Make `PerMachine` and `MachineChoice` have just `build` and `host`
Meson itself *almost* only cares about the build and host platforms. The
exception is it takes a `target_machine` in the cross file and exposes
it to the user; but it doesn't do anything else with it. It's therefore
overkill to put target in `PerMachine` and `MachineChoice`. Instead, we
make a `PerThreeMachine` only for the machine infos.

Additionally fix a few other things that were bugging me in the process:

 - Get rid of `MachineInfos` class. Since `envconfig.py` was created, it
   has no methods that couldn't just got on `PerMachine`

 - Make `default_missing` and `miss_defaulting` work functionally. That
   means we can just locally bind rather than bind as class vars the
   "unfrozen" configuration. This helps prevent bugs where one forgets
   to freeze a configuration.
2019-05-16 00:27:57 +03:00
Dylan Baker 96766010c4 environment: annotate detect_ninja
for mtest
2019-05-14 16:43:29 -07:00
Dylan Baker b557d00f90 environment: search for icl and ifort before cl and goftran
Intel helpfully provides a cl.exe that is indistinguishable from
Microsoft's cl.exe in output, but has the same behavior as icl.exe.
Since icl and ifort will only be present in your path if you've started
an Intel command prompt search for that first.
2019-05-13 11:22:31 -07:00
Dylan Baker 7e4b2f5758 environment: Add search for ICL 2019-05-13 11:22:31 -07:00
Dylan Baker 7d0e0d6f6e linkers: Add linker class for intel's xilib 2019-05-13 11:22:31 -07:00
Dylan Baker 541523eeba compilers: Split C-Like functionality into a mixin classes
Currently C++ inherits C, which can lead to diamond problems. By pulling
the code out into a standalone mixin class that the C, C++, ObjC, and
Objc++ compilers can inherit and override as necessary we remove one
source of diamonding. I've chosen to split this out into it's own file
as the CLikeCompiler class is over 1000 lines by itself. This also
breaks the VisualStudio derived classes inheriting from each other, to
avoid the same C -> CPP inheritance problems. This is all one giant
patch because there just isn't a clean way to separate this.

I've done the same for Fortran since it effectively inherits the
CCompiler (I say effectively because was it actually did was gross
beyond explanation), it's probably not correct, but it seems to work for
now. There really is a lot of layering violation going on in the
Compilers, and a really good scrubbing would do this code a lot of good.
2019-05-03 10:36:50 -07:00
Dylan Baker 604b2534e8 environment: Fix syntax error 2019-05-02 14:56:23 -07:00
Dylan Baker da5f07cf39 Revert "detect Intel ICL on windows"
This reverts commit 3a75bb5259.
2019-05-02 14:56:23 -07:00
Dylan Baker 482e26764e Revert "enable Windows Intel compiler"
This reverts commit 50f2381565.
2019-05-02 14:56:23 -07:00
John Ericson 4c2617a9c6 Add some type annotations and fix lints
Some things, like `method[...](...)` or `x: ... = ...` python 3.5
doesn't support, so I made a comment instead with the intention that it
can someday be made into a real annotation.
2019-05-02 10:58:23 -07:00
Michael Hirsch, Ph.D 50f2381565 enable Windows Intel compiler 2019-04-27 23:19:01 -04:00
Michael Hirsch, Ph.D 3a75bb5259 detect Intel ICL on windows
ICL CPP working
2019-04-27 23:19:01 -04:00
Michael Hirsch, Ph.D ee40533b61 better default order for fotran compiler search
correct PGI windows detection

doc

cleanup PGI detect
2019-04-27 23:19:01 -04:00
Michael Hirsch, Ph.D 25fa5d090f cleanup C/CXX compiler names, adding Intel like for Fortran 2019-04-27 23:19:01 -04:00
Michael Hirsch, Ph.D efff004651 cleanup unused imports PEP8 2019-04-27 23:19:01 -04:00
Michael Hirsch, Ph.D 1c70bae952 order fortran compiler search order more sanely, remove unsupported compiler names 2019-04-27 23:19:00 -04:00
Chun-wei Fan 13d59d75be environment.py: Fix architecture detection on older MSVC
The cl.exe from Visual Studio 2010 and earlier report '80x86', not
'x86', for the architecture that the compiler supports.  So, we ought
to check for that as well to see whether we are building for 32-bit x86.
2019-04-25 00:11:56 +03:00
Richard Kjerstadius 48ee6a6148 Add gcovr 4.2 support
The out-of-source build syntax for gcovr 4.2 is different compared to
previous versions and therefore an update was needed. In researching the
most appropriate solution it was found that any gcovr version older than
3.3 always resulted in 0% coverage. Because of this, rather than adding
an additional layer of logic, some already existing logic was modified
to ensure correct syntax for the new version, while versions older than
3.3 are flagged as not supported.

Closes mesonbuild#5089.
2019-04-24 20:05:21 +02:00
Fernando Ramos d81dfcba74 Add support for the Xtensa toolchain
From (almost) all points of view, the Xtensa toolchain can be treated as
a regular GCC toolchain.

This patch adds very basic support so that, at least, meson does not
fail when trying to use "xt-xcc" (which makes it possible to use it
without problems).
2019-04-22 18:24:47 +03:00
Dylan Baker 3edc7f343b coredata: store cross/native files in the same form they will be used (#5224)
* coredata: store cross/native files in the same form they will be used

Currently they're forced to absolute paths when they're stored in the
coredata datastructure, then when they're loaded we de-absolute path
them to check if they're in the system wide directories. This doesn't
work at all, since the ninja backend will generat a dependency on a
file that is in the source directory unless the path was already given
as absolute. This results in builds being retriggereed forever due to
a non-existant file.

The right way to do this is to figure out whether the file is in the
build directory, is absolute, or is in one of the system paths at
creation time, and store that path as absolute. Then the code that
reads the file and the code that generates the dependencies in the
ninja backend just takes the computed list and there is no mismatch
between them.

Fixes #5257

* run_unittests: Add a test for correct native file storage

This tests the bug in #5257
2019-04-21 23:10:02 +03:00
Jon Turney 050b7d8584
Note when clang objc/objc++ compiler is Windows targeted
When using clang as an objc/objc++ compiler, identify if it's a Windows
targeted compiler, so that GnuLikeCompiler::get_pic_args() doesn't use
'-fPIC', which clang considers an error for the Window target.

Future work: Factor out parsing the clang target string from the
detectors for various languages.
2019-04-15 12:07:17 +01:00
Jon Turney e5008b0109
Unfold cross-compilation case from compilers_from_language() 2019-04-12 11:47:29 +01:00
Janne Grunau 663517d233 detect 'arm64' as aarch64 CPU family
OpenBSD uses arm64 as identifier for the 64-bit ARM architecture.
Refs #1578.
2019-04-01 13:58:05 -07:00
Paolo Bonzini 826ddec4c6 improve log for ninja detection
Print "Found samurai-x.y" when samu is found instead of ninja,
and do not print "Found ninja-1.8-1.8" when NINJA points to
/usr/bin/ninja-1.8.
2019-03-26 22:18:37 +02:00
Paolo Bonzini 6b9b118bf5 support a NINJA environment variable
This can be useful to test a local ninja version (for example while developing
changes to ninja or samurai) without modifying the PATH.

The ninja binary that is detected is then hardcoded in the build.ninja
rules for scan-build and clean, so that it is always used until reconfiguration.
2019-03-26 22:18:37 +02:00
François Revol 31d7255553 Properly detect 'bepc' as 'x86' CPU for Haiku 2019-03-26 22:02:55 +02:00
John Ericson 3037ade41d Inline check_compilers
This function is used just once. It also seems all policy and no
mechanism (it raises, it calls the same function to do all the work
twice in a simple way). This makes it seem to be as a good candidate for
inlining.

`environment` and `coredata` are woefully intertwined and while this
change doesn't fix that, but at least it makes it easier to follow.
2019-03-24 13:33:27 +02:00
Ross Burton 65e59c84a1 mesonbuild: allow multiple --cross-file options
Just like --native-file, allow multiple --cross-file options.  This is mostly
unifying the logic between cross_files and config_files.
2019-03-20 10:06:17 +00:00
Ross Burton d57dd1092e load_configs: generalise the search path
Instead of hard-coding the fact that load_configs() searches for files under
meson/native, pass in the subdirectory allowing the cross-file code to use the
same logic.
2019-03-19 19:16:30 +00:00
Jussi Pakkanen 44dd5535f0
Merge pull request #4724 from jon-turney/lib-machine-always
Fix linking when cross-compiling and a windows resource is first object
2019-03-19 20:39:34 +02:00
jrl64 969e291835 A more verbose RE Definiton in search_version. Closes #5020 2019-03-11 20:29:30 +02:00
Antoine Jacoutot 7bc04996c0 environment: support OpenBSD in detect_objc_compiler
We need to match the "clang --version" output on OpenBSD:
$ clang --version | head -1
OpenBSD clang version 7.0.1 (tags/RELEASE_701/final) (based on LLVM 7.0.1)
2019-03-11 11:37:02 +00:00
Jussi Pakkanen 38a3c30bc5 Fix javac version lookup in JDK11. Closes #4322. 2019-03-05 11:25:21 +02:00
John Ericson c2db7a9cee Sync up initialization logic with Properties and BinaryTable
1. They (and the others) all use PerMachineDefaultable. It's not the
    best class, but consistency come first. (It and all of them can be
    improved accross the board later.)

 2. They use `None` as the default argument so as not to mutate what's
    effectively a global variables. (Thanks @dcbaker!)

 3. They have a `fallback` field to centralize authority on when
    environment variables should be consulted.
2019-02-27 13:10:16 -08:00