Change:
I believe this is due to travis using system llvm which misses the fix backported in . cc
Can we do anything about this?
Our best bet is to add a for tests, I think (alternative is to drop support for LLVM pre 3.9, which would be a shame, even if its buggy in certain cases). Implementation of such directive could be implemented by injecting an environment variable or some such (done ) and checking for that in
There's no need to set an extra environment variable, just check if is set (or if you're boring :wink: )
but… but… what if people have on their own systems too?
cc
no we do not have existing infrastructure for this. I'd prefer to avoid as that's not the relevant piece here, but rather something like or . Distros or anyone else building with an older LLVM are likely to hit this and we'd need a solution for them as well. That being said I think it's fine to temporarily disable the test until we get that. There's basically a 0% chance of us regressing that test as it's just an LLVM bug, and they already have a regression test upstream as well.
Another option would be to create a base Docker image (publishing it to Docker Hub) that is just and the appropriate steps to build whatever version of LLVM we want.
We currently advertise ourselves as supporting LLVM 3.7+, and Travis is kinda our test for that, so I'd prefer to not pull that forward just yet (but instead just fix this)
For the record, I downgraded our LLVM version in a botched rebase and only this test stopped it at bors. Hopefully, someone would have noticed the absence of a fix, but you can't count of that.
touche!

Discussion:
LLC_$(1)=$$(CFG_LLVM_INST_DIR_$(1))/bin/llc$$(X_$(1)) LLVM_ALL_COMPONENTS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --components) <ins> LLVM_VERSION_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --version) </ins> endef

--lldb-python $$(CFG_LLDB_PYTHON)  --gdb-version="$(CFG_GDB_VERSION)"  --lldb-version="$(CFG_LLDB_VERSION)"  <ins> --llvm-version="$$(LLVM_VERSION_$(3))"  </ins> --android-cross-path=$(CFG_ARM_LINUX_ANDROIDEABI_NDK)  --adb-path=$(CFG_ADB)  --adb-test-dir=$(CFG_ADB_TEST_DIR) 

if let Some(ref dir) = build.lldb_python_dir { cmd.arg("--lldb-python-dir").arg(dir); } <ins> let llvm_config = build.llvm_config(target); let llvm_version = output(Command::new(&llvm_config).arg("--version")); cmd.arg("--llvm-version").arg(llvm_version); </ins> cmd.args(&build.flags.args);

// Only pass correct values for these flags for the `run-make` suite as it // requires that a C++ compiler was configured which isn't always the case. if suite == "run-make" { <del> let llvm_config = build.llvm_config(target); </del> let llvm_components = output(Command::new(&llvm_config).arg("--components")); let llvm_cxxflags = output(Command::new(&llvm_config).arg("--cxxflags")); cmd.arg("--cc").arg(build.cc(target))

// option. This file may not be copied, modified, or distributed // except according to those terms. <ins> // min-llvm-version 3.9 </ins> use std::ops::Deref; fn main() {

// Version of LLDB pub lldb_version: Option<String>, <ins> // Version of LLVM pub llvm_version: Option<String>, </ins> // Path to the android tools pub android_cross_path: PathBuf,

(config.mode == common::Pretty && parse_name_directive(ln, "ignore-pretty")) || (config.target != config.host && parse_name_directive(ln, "ignore-cross-compile")) || <del> ignore_gdb(config, ln) || ignore_lldb(config, ln); </del> <ins> ignore_gdb(config, ln) || ignore_lldb(config, ln) || ignore_llvm(config, ln); </ins> props.should_fail = props.should_fail || parse_name_directive(ln, "should-fail"); });

false } } <ins> fn ignore_llvm(config: &Config, line: &str) -> bool { if let Some(ref actual_version) = config.llvm_version { if line.contains("min-llvm-version") { let min_version = line.trim() .split(' ') .last() .expect("Malformed llvm version directive"); // Ignore if actual version is smaller the minimum required // version &actual_version[..] < min_version } else { false } } else { false } } </ins> } }

optopt("", "host", "the host to build for", "HOST"), optopt("", "gdb-version", "the version of GDB used", "VERSION STRING"), optopt("", "lldb-version", "the version of LLDB used", "VERSION STRING"), <ins> optopt("", "llvm-version", "the version of LLVM used", "VERSION STRING"), </ins> optopt("", "android-cross-path", "Android NDK standalone path", "PATH"), optopt("", "adb-path", "path to the android debugger", "PATH"), optopt("", "adb-test-dir", "path to tests for the android debugger", "PATH"),

host: opt_str2(matches.opt_str("host")), gdb_version: extract_gdb_version(matches.opt_str("gdb-version")), lldb_version: extract_lldb_version(matches.opt_str("lldb-version")), <ins> llvm_version: matches.opt_str("llvm-version"), </ins> android_cross_path: opt_path(matches, "android-cross-path"), adb_path: opt_str2(matches.opt_str("adb-path")), adb_test_dir: format!("{}/{}",