diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2017-02-26 14:18:57 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2017-02-27 16:49:32 -0500 |
commit | b9274681375b39d4b63f8ece1ced6dcf18789a4f (patch) | |
tree | 08eaaea7fd6c6409d8562e047a279de22416bc1b /mesonbuild/build.py | |
parent | 92d18b925679f2c889bf248fa23d6611968203f4 (diff) | |
download | meson-b9274681375b39d4b63f8ece1ced6dcf18789a4f.zip meson-b9274681375b39d4b63f8ece1ced6dcf18789a4f.tar.gz meson-b9274681375b39d4b63f8ece1ced6dcf18789a4f.tar.bz2 |
Use cross stripper when cross compiling and allow overriding native strip executable. Closes #1414.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index 28456f7..bdb1dc3 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -324,11 +324,16 @@ class BuildTarget(Target): raise InvalidArguments('Build target %s has no sources.' % name) self.process_compilers() self.validate_sources() + self.validate_cross_install(environment) def __repr__(self): repr_str = "<{0} {1}: {2}>" return repr_str.format(self.__class__.__name__, self.get_id(), self.filename) + def validate_cross_install(self, environment): + if environment.is_cross_build() and not self.is_cross and self.install: + raise InvalidArguments('Tried to install a natively built target in a cross build.') + def get_id(self): # This ID must also be a valid file name on all OSs. # It should also avoid shell metacharacters for obvious @@ -1481,6 +1486,11 @@ class Jar(BuildTarget): def get_java_args(self): return self.java_args + def validate_cross_install(self, environment): + # All jar targets are installable. + pass + + class ConfigureFile: def __init__(self, subdir, sourcename, targetname, configuration_data): |