aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2020-11-12 20:40:49 +0200
committerGitHub <noreply@github.com>2020-11-12 20:40:49 +0200
commit06de675df2172b6c6f9908686540ebf57b20db4a (patch)
treea6ac31a0767fcbff1dc3a761242187555448cb75 /mesonbuild/backend
parent41a79a0757eadf74ea6c3d8985400c56083b68cb (diff)
parentce46070b4ee69fe573ff4105d06b970445fea0aa (diff)
downloadmeson-06de675df2172b6c6f9908686540ebf57b20db4a.zip
meson-06de675df2172b6c6f9908686540ebf57b20db4a.tar.gz
meson-06de675df2172b6c6f9908686540ebf57b20db4a.tar.bz2
Merge pull request #7961 from dcbaker/submit/rust-color-output
Add color output support to rust
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/ninjabackend.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py
index 09f06da..daada12 100644
--- a/mesonbuild/backend/ninjabackend.py
+++ b/mesonbuild/backend/ninjabackend.py
@@ -1494,6 +1494,10 @@ int dummy;
# Rust compiler takes only the main file as input and
# figures out what other files are needed via import
# statements and magic.
+ base_proxy = self.get_base_options_for_target(target)
+ args = rustc.compiler_args()
+ # Compiler args for compiling this target
+ args += compilers.get_base_compile_args(base_proxy, rustc)
main_rust_file = None
for i in target.get_sources():
if not rustc.can_compile(i):
@@ -1503,7 +1507,6 @@ int dummy;
if main_rust_file is None:
raise RuntimeError('A Rust target has no Rust sources. This is weird. Also a bug. Please report')
target_name = os.path.join(target.subdir, target.get_filename())
- args = ['--crate-type']
if isinstance(target, build.Executable):
cratetype = 'bin'
elif hasattr(target, 'rust_crate_type'):
@@ -1514,7 +1517,7 @@ int dummy;
cratetype = 'rlib'
else:
raise InvalidArguments('Unknown target type for rustc.')
- args.append(cratetype)
+ args.extend(['--crate-type', cratetype])
# If we're dynamically linking, add those arguments
#