]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #57514 - michaelwoerister:xlto-tests, r=alexcrichton
authorbors <bors@rust-lang.org>
Thu, 31 Jan 2019 11:07:41 +0000 (11:07 +0000)
committerbors <bors@rust-lang.org>
Thu, 31 Jan 2019 11:07:41 +0000 (11:07 +0000)
compiletest: Support opt-in Clang-based run-make tests and use them for testing xLTO.

Some cross-language run-make tests need a Clang compiler that matches the LLVM version of `rustc`. Since such a compiler usually isn't available these tests (marked with the `needs-matching-clang`
directive) are ignored by default.

For some CI jobs we do need these tests to run unconditionally though. In order to support this a `--force-clang-based-tests` flag is added to compiletest. If this flag is specified, `compiletest` will fail if it can't detect an appropriate version of Clang.

@rust-lang/infra The PR doesn't yet enable the tests yet. Do you have any recommendation for which jobs to enable them?

cc #57438

r? @alexcrichton

1  2 
config.toml.example
src/bootstrap/config.rs
src/bootstrap/native.rs
src/bootstrap/test.rs
src/tools/compiletest/src/header.rs
src/tools/compiletest/src/main.rs
src/tools/compiletest/src/runtest.rs

Simple merge
index ba339c50fc30418d95692f3b79fa3d9f6de5a926,2871db2c9a2d124829ffdec2ac57fdba067926a2..7d3e584f1a6fa4f649cc6f3b8e506908a44c7838
@@@ -257,10 -255,8 +258,11 @@@ struct Llvm 
      link_shared: Option<bool>,
      version_suffix: Option<String>,
      clang_cl: Option<String>,
 +    cflags: Option<String>,
 +    cxxflags: Option<String>,
 +    ldflags: Option<String>,
      use_libcxx: Option<bool>,
+     use_linker: Option<String>,
  }
  
  #[derive(Deserialize, Default, Clone)]
@@@ -522,11 -518,8 +524,12 @@@ impl Config 
              config.llvm_link_jobs = llvm.link_jobs;
              config.llvm_version_suffix = llvm.version_suffix.clone();
              config.llvm_clang_cl = llvm.clang_cl.clone();
 +
 +            config.llvm_cflags = llvm.cflags.clone();
 +            config.llvm_cxxflags = llvm.cxxflags.clone();
 +            config.llvm_ldflags = llvm.ldflags.clone();
              set(&mut config.llvm_use_libcxx, llvm.use_libcxx);
+             config.llvm_use_linker = llvm.use_linker.clone();
          }
  
          if let Some(ref rust) = toml.rust {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge