From aed5b9c81540343987649db9a5836bedc7e56258 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 16 Apr 2018 14:27:37 +0200 Subject: [PATCH 01/12] Declare embedded LLVM bitcode section readonly. --- src/librustc_trans/back/write.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index 148e3d0025c83..a14c98acb2dc3 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -848,6 +848,7 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext, }; llvm::LLVMSetSection(llglobal, section.as_ptr() as *const _); llvm::LLVMRustSetLinkage(llglobal, llvm::Linkage::PrivateLinkage); + llvm::LLVMSetGlobalConstant(llglobal, llvm::True); let llconst = C_bytes_in_context(llcx, &[]); let llglobal = llvm::LLVMAddGlobal( From 443f99fca02365c8d4cbc734d290d4b0cc7c3ae6 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 16 Apr 2018 16:25:29 +0200 Subject: [PATCH 02/12] Add -Z cross-lang-lto flag in order to support linker-based LTO. --- src/librustc/session/config.rs | 2 ++ src/librustc_trans/back/write.rs | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/librustc/session/config.rs b/src/librustc/session/config.rs index 59b40e9e2dc56..574a8992ad159 100644 --- a/src/librustc/session/config.rs +++ b/src/librustc/session/config.rs @@ -1293,6 +1293,8 @@ options! {DebuggingOptions, DebuggingSetter, basic_debugging_options, "make the current crate share its generic instantiations"), chalk: bool = (false, parse_bool, [TRACKED], "enable the experimental Chalk-based trait solving engine"), + cross_lang_lto: bool = (false, parse_bool, [TRACKED], + "generate build artifacts that are compatible with linker-based LTO."), } pub fn default_lib_output() -> CrateType { diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index a14c98acb2dc3..aeed81fa05949 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -293,7 +293,8 @@ impl ModuleConfig { self.inline_threshold = sess.opts.cg.inline_threshold; self.obj_is_bitcode = sess.target.target.options.obj_is_bitcode; let embed_bitcode = sess.target.target.options.embed_bitcode || - sess.opts.debugging_opts.embed_bitcode; + sess.opts.debugging_opts.embed_bitcode || + sess.opts.debugging_opts.cross_lang_lto; if embed_bitcode { match sess.opts.optimize { config::OptLevel::No | From 98bf62a109bd7d7071e5d3b8f35186cf33124722 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 16 Apr 2018 16:26:40 +0200 Subject: [PATCH 03/12] Add tests for -Z cross-lang-lto. --- src/test/run-make/cross-lang-lto/Makefile | 49 +++++++++++++++++++++++ src/test/run-make/cross-lang-lto/lib.rs | 14 +++++++ src/test/run-make/cross-lang-lto/main.rs | 13 ++++++ 3 files changed, 76 insertions(+) create mode 100644 src/test/run-make/cross-lang-lto/Makefile create mode 100644 src/test/run-make/cross-lang-lto/lib.rs create mode 100644 src/test/run-make/cross-lang-lto/main.rs diff --git a/src/test/run-make/cross-lang-lto/Makefile b/src/test/run-make/cross-lang-lto/Makefile new file mode 100644 index 0000000000000..e664394d1eace --- /dev/null +++ b/src/test/run-make/cross-lang-lto/Makefile @@ -0,0 +1,49 @@ +# This test makes sure that the expected .llvmbc sections for use by +# linker-based LTO are available in object files when compiling with +# -Z cross-lang-lto + +-include ../../run-make-fulldeps/tools.mk + +LLVMBC_SECTION_NAME=\\.llvmbc + +ifeq ($(UNAME),Darwin) + LLVMBC_SECTION_NAME=__LLVM,__bitcode +endif + + +OBJDUMP=$(HOST_RPATH_DIR)/../../llvm/bin/llvm-objdump +SECTION_HEADERS=$(OBJDUMP) -section-headers + +BUILD_LIB=$(RUSTC) lib.rs -Copt-level=2 -Z cross-lang-lto -Ccodegen-units=1 + +BUILD_EXE=$(RUSTC) main.rs -Copt-level=2 -Z cross-lang-lto -Ccodegen-units=1 --emit=obj + +all: staticlib staticlib-fat-lto staticlib-thin-lto rlib exe cdylib rdylib + +staticlib: lib.rs + $(BUILD_LIB) --crate-type=staticlib + [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib.a | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] + +staticlib-fat-lto: lib.rs + $(BUILD_LIB) --crate-type=staticlib -o $(TMPDIR)/liblib-fat-lto.a -Clto=fat + [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib-fat-lto.a | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] + +staticlib-thin-lto: lib.rs + $(BUILD_LIB) --crate-type=staticlib -o $(TMPDIR)/liblib-thin-lto.a -Clto=thin + [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib-thin-lto.a | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] + +rlib: lib.rs + $(BUILD_LIB) --crate-type=rlib + [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib.rlib | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] + +cdylib: lib.rs + $(BUILD_LIB) --crate-type=cdylib --emit=obj -o $(TMPDIR)/cdylib.o + [ "$$($(SECTION_HEADERS) $(TMPDIR)/cdylib.o | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] + +rdylib: lib.rs + $(BUILD_LIB) --crate-type=dylib --emit=obj -o $(TMPDIR)/rdylib.o + [ "$$($(SECTION_HEADERS) $(TMPDIR)/rdylib.o | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] + +exe: lib.rs + $(BUILD_EXE) -o $(TMPDIR)/exe.o + [ "$$($(SECTION_HEADERS) $(TMPDIR)/exe.o | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] diff --git a/src/test/run-make/cross-lang-lto/lib.rs b/src/test/run-make/cross-lang-lto/lib.rs new file mode 100644 index 0000000000000..b2a5b946160f0 --- /dev/null +++ b/src/test/run-make/cross-lang-lto/lib.rs @@ -0,0 +1,14 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#[no_mangle] +pub extern "C" fn foo() { + println!("abc"); +} diff --git a/src/test/run-make/cross-lang-lto/main.rs b/src/test/run-make/cross-lang-lto/main.rs new file mode 100644 index 0000000000000..ccd34c9e4dbed --- /dev/null +++ b/src/test/run-make/cross-lang-lto/main.rs @@ -0,0 +1,13 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + println!("Hello World"); +} From 54b0e07061c83fca38642294adf25a3294fcf8d3 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 17 Apr 2018 11:43:33 +0200 Subject: [PATCH 04/12] Add LLVM bin directory to PATH for running run-make tests. --- src/bootstrap/test.rs | 17 ++++++++++++++--- src/test/run-make/cross-lang-lto/Makefile | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index e8c40dfdb0ad2..23b701af84614 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1019,7 +1019,7 @@ impl Step for Compiletest { // 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 !builder.config.dry_run && suite == "run-make-fulldeps" { + if !builder.config.dry_run && mode == "run-make" { let llvm_components = output(Command::new(&llvm_config).arg("--components")); let llvm_cxxflags = output(Command::new(&llvm_config).arg("--cxxflags")); cmd.arg("--cc").arg(builder.cc(target)) @@ -1030,15 +1030,26 @@ impl Step for Compiletest { if let Some(ar) = builder.ar(target) { cmd.arg("--ar").arg(ar); } + + // Add the llvm/bin directory to PATH since it contains lots of + // useful, platform-independent tools + let llvm_bin_path = llvm_config.parent() + .expect("Expected llvm-config to be contained in directory"); + assert!(llvm_bin_path.is_dir()); + let old_path = env::var_os("PATH").unwrap_or_default(); + let new_path = env::join_paths(iter::once(llvm_bin_path.to_path_buf()) + .chain(env::split_paths(&old_path))) + .expect(""); + cmd.env("PATH", new_path); } } - if suite == "run-make-fulldeps" && !builder.config.llvm_enabled { + if mode == "run-make" && !builder.config.llvm_enabled { builder.info( &format!("Ignoring run-make test suite as they generally don't work without LLVM")); return; } - if suite != "run-make-fulldeps" { + if mode != "run-make" { cmd.arg("--cc").arg("") .arg("--cxx").arg("") .arg("--cflags").arg("") diff --git a/src/test/run-make/cross-lang-lto/Makefile b/src/test/run-make/cross-lang-lto/Makefile index e664394d1eace..8cd1fde05d439 100644 --- a/src/test/run-make/cross-lang-lto/Makefile +++ b/src/test/run-make/cross-lang-lto/Makefile @@ -11,7 +11,7 @@ ifeq ($(UNAME),Darwin) endif -OBJDUMP=$(HOST_RPATH_DIR)/../../llvm/bin/llvm-objdump +OBJDUMP=llvm-objdump SECTION_HEADERS=$(OBJDUMP) -section-headers BUILD_LIB=$(RUSTC) lib.rs -Copt-level=2 -Z cross-lang-lto -Ccodegen-units=1 From d58ab3dbb8bb1d86cf74435655e088083b2c80b6 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 17 Apr 2018 13:15:27 +0200 Subject: [PATCH 05/12] Use correct section name for embedded LLVM bitcode on OSX. --- src/librustc_trans/back/write.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index aeed81fa05949..0d4e8018dc2d2 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -842,7 +842,11 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext, "rustc.embedded.module\0".as_ptr() as *const _, ); llvm::LLVMSetInitializer(llglobal, llconst); - let section = if cgcx.opts.target_triple.triple().contains("-ios") { + + let is_apple = cgcx.opts.target_triple.triple().contains("-ios") || + cgcx.opts.target_triple.triple().contains("-darwin"); + + let section = if is_apple { "__LLVM,__bitcode\0" } else { ".llvmbc\0" @@ -858,7 +862,7 @@ unsafe fn embed_bitcode(cgcx: &CodegenContext, "rustc.embedded.cmdline\0".as_ptr() as *const _, ); llvm::LLVMSetInitializer(llglobal, llconst); - let section = if cgcx.opts.target_triple.triple().contains("-ios") { + let section = if is_apple { "__LLVM,__cmdline\0" } else { ".llvmcmd\0" From fefed137470ecba8ee662c93b19bf39edffcde7e Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 17 Apr 2018 13:37:43 +0200 Subject: [PATCH 06/12] Support test header directives in run-make mode too. --- src/tools/compiletest/src/header.rs | 22 ++++++++++++++++------ src/tools/compiletest/src/main.rs | 7 ++++++- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index 73dd079cf0ccb..32a0b75b33dd3 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -419,6 +419,15 @@ fn iter_header(testfile: &Path, cfg: Option<&str>, it: &mut FnMut(&str)) { if testfile.is_dir() { return; } + + let comment = if testfile.to_string_lossy().ends_with(".rs") { + "//" + } else { + "#" + }; + + let comment_with_brace = comment.to_string() + "["; + let rdr = BufReader::new(File::open(testfile).unwrap()); for ln in rdr.lines() { // Assume that any directives will be found before the first @@ -428,10 +437,11 @@ fn iter_header(testfile: &Path, cfg: Option<&str>, it: &mut FnMut(&str)) { let ln = ln.trim(); if ln.starts_with("fn") || ln.starts_with("mod") { return; - } else if ln.starts_with("//[") { + } else if ln.starts_with(&comment_with_brace) { // A comment like `//[foo]` is specific to revision `foo` if let Some(close_brace) = ln.find(']') { - let lncfg = &ln[3..close_brace]; + let open_brace = ln.find('[').unwrap(); + let lncfg = &ln[open_brace + 1 .. close_brace]; let matches = match cfg { Some(s) => s == &lncfg[..], None => false, @@ -440,11 +450,11 @@ fn iter_header(testfile: &Path, cfg: Option<&str>, it: &mut FnMut(&str)) { it(ln[(close_brace + 1) ..].trim_left()); } } else { - panic!("malformed condition directive: expected `//[foo]`, found `{}`", - ln) + panic!("malformed condition directive: expected `{}foo]`, found `{}`", + comment_with_brace, ln) } - } else if ln.starts_with("//") { - it(ln[2..].trim_left()); + } else if ln.starts_with(comment) { + it(ln[comment.len() ..].trim_left()); } } return; diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index 37f7af0abe8f5..d65a8d6a7dbf5 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -610,7 +610,12 @@ pub fn is_test(file_name: &OsString) -> bool { } pub fn make_test(config: &Config, testpaths: &TestPaths) -> test::TestDescAndFn { - let early_props = EarlyProps::from_file(config, &testpaths.file); + + let early_props = if config.mode == Mode::RunMake { + EarlyProps::from_file(config, &testpaths.file.join("Makefile")) + } else { + EarlyProps::from_file(config, &testpaths.file) + }; // The `should-fail` annotation doesn't apply to pretty tests, // since we run the pretty printer across all tests by default. From ae149f11ec01acd61dda074224becaaf7101b116 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Tue, 17 Apr 2018 13:38:19 +0200 Subject: [PATCH 07/12] Ignore cross-lang-lto test for LLVM versions without ThinLTO. --- src/test/run-make/cross-lang-lto/Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/test/run-make/cross-lang-lto/Makefile b/src/test/run-make/cross-lang-lto/Makefile index 8cd1fde05d439..fad8cdf126753 100644 --- a/src/test/run-make/cross-lang-lto/Makefile +++ b/src/test/run-make/cross-lang-lto/Makefile @@ -1,9 +1,12 @@ + +# min-llvm-version 4.0 + +-include ../../run-make-fulldeps/tools.mk + # This test makes sure that the expected .llvmbc sections for use by # linker-based LTO are available in object files when compiling with # -Z cross-lang-lto --include ../../run-make-fulldeps/tools.mk - LLVMBC_SECTION_NAME=\\.llvmbc ifeq ($(UNAME),Darwin) From a21fb3f8da4f96632d4a8be98f1abe791b0b80d5 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 20 Apr 2018 15:45:16 +0200 Subject: [PATCH 08/12] Make run-make host_test!(). --- src/bootstrap/test.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 23b701af84614..13390bf411071 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -832,7 +832,7 @@ test!(RunFailFullDepsPretty { host: true }); -default_test!(RunMake { +host_test!(RunMake { path: "src/test/run-make", mode: "run-make", suite: "run-make" From 34e658ebd887a2d8bd626593d65b6a03fe84f52a Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 20 Apr 2018 15:46:47 +0200 Subject: [PATCH 09/12] Don't run LTO passes in rustc when cross-lang LTO is enabled. --- src/librustc_trans/back/write.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/librustc_trans/back/write.rs b/src/librustc_trans/back/write.rs index 0d4e8018dc2d2..b6fae3eaff23a 100644 --- a/src/librustc_trans/back/write.rs +++ b/src/librustc_trans/back/write.rs @@ -1356,6 +1356,10 @@ fn execute_work_item(cgcx: &CodegenContext, // settings. let needs_lto = needs_lto && mtrans.kind != ModuleKind::Metadata; + // Don't run LTO passes when cross-lang LTO is enabled. The linker + // will do that for us in this case. + let needs_lto = needs_lto && !cgcx.opts.debugging_opts.cross_lang_lto; + if needs_lto { Ok(WorkItemResult::NeedsLTO(mtrans)) } else { From 6a7114396596cf378e76b4d42630c1551e32c55e Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 23 Apr 2018 11:48:51 +0200 Subject: [PATCH 10/12] run-make/cross-lang-lto: Make output artifact names consistent across platforms. --- src/test/run-make/cross-lang-lto/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/test/run-make/cross-lang-lto/Makefile b/src/test/run-make/cross-lang-lto/Makefile index fad8cdf126753..0c72d80ecc7e6 100644 --- a/src/test/run-make/cross-lang-lto/Makefile +++ b/src/test/run-make/cross-lang-lto/Makefile @@ -1,5 +1,6 @@ # min-llvm-version 4.0 +# ignore-mingw -include ../../run-make-fulldeps/tools.mk @@ -24,7 +25,7 @@ BUILD_EXE=$(RUSTC) main.rs -Copt-level=2 -Z cross-lang-lto -Ccodegen-units=1 --e all: staticlib staticlib-fat-lto staticlib-thin-lto rlib exe cdylib rdylib staticlib: lib.rs - $(BUILD_LIB) --crate-type=staticlib + $(BUILD_LIB) --crate-type=staticlib -o $(TMPDIR)/liblib.a [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib.a | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] staticlib-fat-lto: lib.rs @@ -36,7 +37,7 @@ staticlib-thin-lto: lib.rs [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib-thin-lto.a | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] rlib: lib.rs - $(BUILD_LIB) --crate-type=rlib + $(BUILD_LIB) --crate-type=rlib -o $(TMPDIR)/liblib.rlib [ "$$($(SECTION_HEADERS) $(TMPDIR)/liblib.rlib | grep -c $(LLVMBC_SECTION_NAME))" -ne "0" ] cdylib: lib.rs From d0253ad7246fb1957ba5d97807d7b0a5e37753d2 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Fri, 4 May 2018 03:20:29 -0700 Subject: [PATCH 11/12] bootstrap: Fix LLVM bin path setup for Windows. --- src/bootstrap/test.rs | 11 ----------- src/bootstrap/tool.rs | 42 +++++++++++++++++++++++++++++++++++++++--- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs index 13390bf411071..b1d63c985aab3 100644 --- a/src/bootstrap/test.rs +++ b/src/bootstrap/test.rs @@ -1030,17 +1030,6 @@ impl Step for Compiletest { if let Some(ar) = builder.ar(target) { cmd.arg("--ar").arg(ar); } - - // Add the llvm/bin directory to PATH since it contains lots of - // useful, platform-independent tools - let llvm_bin_path = llvm_config.parent() - .expect("Expected llvm-config to be contained in directory"); - assert!(llvm_bin_path.is_dir()); - let old_path = env::var_os("PATH").unwrap_or_default(); - let new_path = env::join_paths(iter::once(llvm_bin_path.to_path_buf()) - .chain(env::split_paths(&old_path))) - .expect(""); - cmd.env("PATH", new_path); } } if mode == "run-make" && !builder.config.llvm_enabled { diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs index 6c29bd84fe467..220af6bd6e4af 100644 --- a/src/bootstrap/tool.rs +++ b/src/bootstrap/tool.rs @@ -10,6 +10,7 @@ use std::fs; use std::env; +use std::iter; use std::path::PathBuf; use std::process::{Command, exit}; @@ -593,7 +594,7 @@ impl<'a> Builder<'a> { /// right location to run `compiler`. fn prepare_tool_cmd(&self, compiler: Compiler, cmd: &mut Command) { let host = &compiler.host; - let mut paths: Vec = vec![ + let mut lib_paths: Vec = vec![ PathBuf::from(&self.sysroot_libdir(compiler, compiler.host)), self.cargo_out(compiler, Mode::Tool, *host).join("deps"), ]; @@ -610,11 +611,46 @@ impl<'a> Builder<'a> { } for path in env::split_paths(v) { if !curpaths.contains(&path) { - paths.push(path); + lib_paths.push(path); } } } } - add_lib_path(paths, cmd); + + // Add the llvm/bin directory to PATH since it contains lots of + // useful, platform-independent tools + if let Some(llvm_bin_path) = self.llvm_bin_path() { + if host.contains("windows") { + // On Windows, PATH and the dynamic library path are the same, + // so we just add the LLVM bin path to lib_path + lib_paths.push(llvm_bin_path); + } else { + let old_path = env::var_os("PATH").unwrap_or_default(); + let new_path = env::join_paths(iter::once(llvm_bin_path) + .chain(env::split_paths(&old_path))) + .expect("Could not add LLVM bin path to PATH"); + cmd.env("PATH", new_path); + } + } + + add_lib_path(lib_paths, cmd); + } + + fn llvm_bin_path(&self) -> Option { + if self.config.llvm_enabled && !self.config.dry_run { + let llvm_config = self.ensure(native::Llvm { + target: self.config.build, + emscripten: false, + }); + + // Add the llvm/bin directory to PATH since it contains lots of + // useful, platform-independent tools + let llvm_bin_path = llvm_config.parent() + .expect("Expected llvm-config to be contained in directory"); + assert!(llvm_bin_path.is_dir()); + Some(llvm_bin_path.to_path_buf()) + } else { + None + } } } From 0bf26bf9519025e2c89d1d51ba8c7fe52351675f Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Mon, 7 May 2018 09:52:38 +0200 Subject: [PATCH 12/12] Fix Mac OS section name for LLVM bitcode. --- src/test/run-make/cross-lang-lto/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/run-make/cross-lang-lto/Makefile b/src/test/run-make/cross-lang-lto/Makefile index 0c72d80ecc7e6..98b509cd81f54 100644 --- a/src/test/run-make/cross-lang-lto/Makefile +++ b/src/test/run-make/cross-lang-lto/Makefile @@ -11,7 +11,7 @@ LLVMBC_SECTION_NAME=\\.llvmbc ifeq ($(UNAME),Darwin) - LLVMBC_SECTION_NAME=__LLVM,__bitcode + LLVMBC_SECTION_NAME=__bitcode endif