On Fri, Mar 30, 2018 at 10:40:16AM +0200, Sebastien Marie wrote:
> Hi,
>
> Here an update for lang/rust 1.25.0
>
> Some changes port wise:
> - in order to keep RUST_BACKTRACE=1 during build, properly separate
> MAKE_ENV and TEST_ENV, by introduce a TEST_BIN variable used for
> launching rustbuild with TEST_ENV (some tests are failing if the
> backtrace is here).
>
> - remove llvm-6 backported patches. this version of rustc has full
> support of it (but hashes in library names will change. PLIST patches
> will be required when devel/llvm will be upgraded to llvm-6).
>
> - backport #49140 to be able to run "make test" without installing rustc
> first (and eventually regenerating PLIST).
>
> The port has been tested:
> - build on i386 (after several tries)
> - build and pass testsuite on amd64
> - textproc/ripgrep build
> - www/mozilla-firefox build
>
Diff regenerated with HEAD version of cvs... sorry the previous diff
didn't apply cleanly. It was spotted by landry@.
Thanks.
--
Sebastien Marie
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/rust/Makefile,v
retrieving revision 1.64
diff -u -p -r1.64 Makefile
--- Makefile 16 Mar 2018 07:36:40 -0000 1.64
+++ Makefile 30 Mar 2018 09:28:44 -0000
@@ -13,14 +13,13 @@ DPB_PROPERTIES = parallel
COMMENT-main = compiler for Rust Language
COMMENT-doc = html documentation for rustc
-V = 1.24.0
-CARGO_V = 0.25.0
+V = 1.25.0
+CARGO_V = 0.26.0
DISTNAME = rustc-${V}-src
-REVISION = 0
# rustc bootstrap version
-BV-amd64 = 1.24.0-20180308
-BV-i386 = 1.24.0-20180316
+BV-amd64 = 1.25.0-20180326
+BV-i386 = 1.25.0-20180330
BV = ${BV-${MACHINE_ARCH}}
PKGNAME = rust-${V}
@@ -86,6 +85,7 @@ LIB_DEPENDS += devel/libgit2/libgit2 \
MAKE_ENV = LIBGIT2_SYS_USE_PKG_CONFIG=1 \
RUST_BACKTRACE=1
+TEST_ENV = RUST_BACKTRACE=0
# build/configuration variables
PATCHORIG = .openbsd.orig
@@ -95,8 +95,7 @@ USE_GMAKE = Yes
# need for libbacktrace
USE_LIBTOOL = gnu
-TEST_DEPENDS += ${FULLPKGNAME-main}:${BUILD_PKGPATH} \
- devel/git \
+TEST_DEPENDS += devel/git \
sysutils/ggrep
# - disable vendor checksum checks
@@ -155,6 +154,8 @@ do-configure:
BUILD_BIN = cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \
${MODPY_BIN} ${WRKSRC}/x.py
+TEST_BIN = cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} ${TEST_ENV} \
+ ${MODPY_BIN} ${WRKSRC}/x.py
do-build:
${BUILD_BIN} dist --jobs=${MAKE_JOBS}
@@ -195,7 +196,7 @@ post-install:
${MODPY_BIN} ${MODPY_LIBDIR}/compileall.py ${PREFIX}/lib/rustlib/etc
do-test:
- ${BUILD_BIN} test --jobs=${MAKE_JOBS}
+ ${TEST_BIN} test --jobs=${MAKE_JOBS}
# bootstrap target permits to regenerate the bootstrap archive
BOOTSTRAPDIR=${WRKDIR}/rustc-bootstrap-${MACHINE_ARCH}-${V}-new
Index: distinfo
===================================================================
RCS file: /cvs/ports/lang/rust/distinfo,v
retrieving revision 1.33
diff -u -p -r1.33 distinfo
--- distinfo 16 Mar 2018 07:36:40 -0000 1.33
+++ distinfo 30 Mar 2018 09:28:44 -0000
@@ -1,6 +1,6 @@
-SHA256 (rust/rustc-1.24.0-src.tar.gz) = u4J29gROh35Efyn1ZuS7+CD6Uf6i+RLVm3MjP/2VY58=
-SHA256 (rust/rustc-bootstrap-amd64-1.24.0-20180308.tar.gz) = qC6MXaM7/DQVJ7Z0xDkY8EphBjdMgyiQPdFfQecy7J4=
-SHA256 (rust/rustc-bootstrap-i386-1.24.0-20180316.tar.gz) = /XnRx0StUBhZWyUmT0a0p4maaiHZm10pcPS8t78371Q=
-SIZE (rust/rustc-1.24.0-src.tar.gz) = 67506894
-SIZE (rust/rustc-bootstrap-amd64-1.24.0-20180308.tar.gz) = 85090848
-SIZE (rust/rustc-bootstrap-i386-1.24.0-20180316.tar.gz) = 86182466
+SHA256 (rust/rustc-1.25.0-src.tar.gz) = 7vY6Cu6lFHkwo2au54y94ki7blxoaIAb3zSEkVKWXS0=
+SHA256 (rust/rustc-bootstrap-amd64-1.25.0-20180326.tar.gz) = qsGPAoRUipfs1tvrVgEVaW59D6yVVyklFNnAxpD/MsE=
+SHA256 (rust/rustc-bootstrap-i386-1.25.0-20180330.tar.gz) = T2qMqBwoHHN1oFec63sHz8xxHBG1yOSRW+oBDmWihtI=
+SIZE (rust/rustc-1.25.0-src.tar.gz) = 98639156
+SIZE (rust/rustc-bootstrap-amd64-1.25.0-20180326.tar.gz) = 75589383
+SIZE (rust/rustc-bootstrap-i386-1.25.0-20180330.tar.gz) = 77074679
Index: patches/patch-src_bootstrap_bin_rustc_rs
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-src_bootstrap_bin_rustc_rs,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_bootstrap_bin_rustc_rs
--- patches/patch-src_bootstrap_bin_rustc_rs 23 Feb 2018 16:38:16 -0000 1.2
+++ patches/patch-src_bootstrap_bin_rustc_rs 30 Mar 2018 09:28:44 -0000
@@ -6,7 +6,7 @@ try to reduce memory usage on i386:
Index: src/bootstrap/bin/rustc.rs
--- src/bootstrap/bin/rustc.rs.orig
+++ src/bootstrap/bin/rustc.rs
-@@ -179,6 +179,12 @@ fn main() {
+@@ -174,6 +174,12 @@ fn main() {
cmd.arg("-Ccodegen-units=16").arg("-Zthinlto");
}
Index: patches/patch-src_bootstrap_builder_rs
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-src_bootstrap_builder_rs,v
retrieving revision 1.2
diff -u -p -r1.2 patch-src_bootstrap_builder_rs
--- patches/patch-src_bootstrap_builder_rs 23 Feb 2018 16:38:16 -0000 1.2
+++ patches/patch-src_bootstrap_builder_rs 30 Mar 2018 09:28:44 -0000
@@ -1,25 +1,18 @@
-$OpenBSD: patch-src_bootstrap_builder_rs,v 1.2 2018/02/23 16:38:16 landry Exp $
-disable Bootstrap test as it requires network access.
-pass RUSTC_ERROR_METADATA_DST as absolute path (8c9bf663d4a8074e4955d1ad3f85a3b82e946297).
+$OpenBSD$
+- disable test::Bootstrap (require network)
+- disable test::Debuginfo (require recent gdb, and some are failing with egdb)
Index: src/bootstrap/builder.rs
--- src/bootstrap/builder.rs.orig
+++ src/bootstrap/builder.rs
-@@ -251,7 +251,7 @@ impl<'a> Builder<'a> {
- tool::Compiletest, tool::RemoteTestServer, tool::RemoteTestClient,
+@@ -318,9 +318,9 @@ impl<'a> Builder<'a> {
tool::RustInstaller, tool::Cargo, tool::Rls, tool::Rustdoc, tool::Clippy,
native::Llvm, tool::Rustfmt, tool::Miri),
-- Kind::Test => describe!(check::Tidy, check::Bootstrap, check::DefaultCompiletest,
-+ Kind::Test => describe!(check::Tidy, /*check::Bootstrap,*/ check::DefaultCompiletest,
- check::HostCompiletest, check::Crate, check::CrateLibrustc, check::Rustdoc,
- check::Linkcheck, check::Cargotest, check::Cargo, check::Rls, check::Docs,
- check::ErrorIndex, check::Distcheck, check::Rustfmt, check::Miri, check::Clippy),
-@@ -484,7 +484,8 @@ impl<'a> Builder<'a> {
- } else {
- PathBuf::from("/path/to/nowhere/rustdoc/not/required")
- })
-- .env("TEST_MIRI", self.config.test_miri.to_string());
-+ .env("TEST_MIRI", self.config.test_miri.to_string())
-+ .env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir());
-
- if let Some(n) = self.config.rust_codegen_units {
- cargo.env("RUSTC_CODEGEN_UNITS", n.to_string());
+ Kind::Check => describe!(check::Std, check::Test, check::Rustc),
+- Kind::Test => describe!(test::Tidy, test::Bootstrap, test::Ui, test::RunPass,
++ Kind::Test => describe!(test::Tidy, test::Ui, test::RunPass,
+ test::CompileFail, test::ParseFail, test::RunFail, test::RunPassValgrind,
+- test::MirOpt, test::Codegen, test::CodegenUnits, test::Incremental, test::Debuginfo,
++ test::MirOpt, test::Codegen, test::CodegenUnits, test::Incremental,
+ test::UiFullDeps, test::RunPassFullDeps, test::RunFailFullDeps,
+ test::CompileFailFullDeps, test::IncrementalFullDeps, test::Rustdoc, test::Pretty,
+ test::RunPassPretty, test::RunFailPretty, test::RunPassValgrindPretty,
Index: patches/patch-src_bootstrap_check_rs
===================================================================
RCS file: patches/patch-src_bootstrap_check_rs
diff -N patches/patch-src_bootstrap_check_rs
--- patches/patch-src_bootstrap_check_rs 23 Feb 2018 16:38:16 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_bootstrap_check_rs,v 1.1 2018/02/23 16:38:16 landry Exp $
-pass RUSTC_ERROR_METADATA_DST as absolute path (8c9bf663d4a8074e4955d1ad3f85a3b82e946297).
-Index: src/bootstrap/check.rs
---- src/bootstrap/check.rs.orig
-+++ src/bootstrap/check.rs
-@@ -980,7 +980,8 @@ impl Step for ErrorIndex {
- build.run(builder.tool_cmd(Tool::ErrorIndex)
- .arg("markdown")
- .arg(&output)
-- .env("CFG_BUILD", &build.build));
-+ .env("CFG_BUILD", &build.build)
-+ .env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir()));
-
- markdown_test(builder, compiler, &output);
- }
Index: patches/patch-src_bootstrap_dist_rs
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-src_bootstrap_dist_rs,v
retrieving revision 1.3
diff -u -p -r1.3 patch-src_bootstrap_dist_rs
--- patches/patch-src_bootstrap_dist_rs 23 Feb 2018 16:38:16 -0000 1.3
+++ patches/patch-src_bootstrap_dist_rs 30 Mar 2018 09:28:44 -0000
@@ -5,7 +5,7 @@ requires too much RAM for i386
Index: src/bootstrap/dist.rs
--- src/bootstrap/dist.rs.orig
+++ src/bootstrap/dist.rs
-@@ -1292,6 +1292,10 @@ impl Step for Extended {
+@@ -1285,6 +1285,10 @@ impl Step for Extended {
target,
});
Index: patches/patch-src_bootstrap_doc_rs
===================================================================
RCS file: patches/patch-src_bootstrap_doc_rs
diff -N patches/patch-src_bootstrap_doc_rs
--- patches/patch-src_bootstrap_doc_rs 23 Feb 2018 16:38:16 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,15 +0,0 @@
-$OpenBSD: patch-src_bootstrap_doc_rs,v 1.1 2018/02/23 16:38:16 landry Exp $
-pass RUSTC_ERROR_METADATA_DST as absolute path (8c9bf663d4a8074e4955d1ad3f85a3b82e946297).
-Index: src/bootstrap/doc.rs
---- src/bootstrap/doc.rs.orig
-+++ src/bootstrap/doc.rs
-@@ -671,7 +671,8 @@ impl Step for ErrorIndex {
- index.arg(out.join("error-index.html"));
-
- // FIXME: shouldn't have to pass this env var
-- index.env("CFG_BUILD", &build.build);
-+ index.env("CFG_BUILD", &build.build)
-+ .env("RUSTC_ERROR_METADATA_DST", build.extended_error_dir());
-
- build.run(&mut index);
- }
Index: patches/patch-src_bootstrap_lib_rs
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-src_bootstrap_lib_rs,v
retrieving revision 1.10
diff -u -p -r1.10 patch-src_bootstrap_lib_rs
--- patches/patch-src_bootstrap_lib_rs 23 Feb 2018 16:38:16 -0000 1.10
+++ patches/patch-src_bootstrap_lib_rs 30 Mar 2018 09:28:44 -0000
@@ -1,10 +1,9 @@
$OpenBSD: patch-src_bootstrap_lib_rs,v 1.10 2018/02/23 16:38:16 landry Exp $
let us compilation choice to be honored.
-define extended_error as absolute path (8c9bf663d4a8074e4955d1ad3f85a3b82e946297).
Index: src/bootstrap/lib.rs
--- src/bootstrap/lib.rs.orig
+++ src/bootstrap/lib.rs
-@@ -632,7 +632,6 @@ impl Build {
+@@ -642,7 +642,6 @@ impl Build {
// cc-rs because the build scripts will determine that for themselves.
let mut base = self.cc[&target].args().iter()
.map(|s| s.to_string_lossy().into_owned())
@@ -12,15 +11,3 @@ Index: src/bootstrap/lib.rs
.collect::<Vec<_>>();
// If we're compiling on macOS then we add a few unconditional flags
-@@ -719,6 +718,11 @@ impl Build {
- /// Path to the python interpreter to use
- fn python(&self) -> &Path {
- self.config.python.as_ref().unwrap()
-+ }
-+
-+ /// Temporary directory that extended error information is emitted to.
-+ fn extended_error_dir(&self) -> PathBuf {
-+ self.out.join("tmp/extended-error-metadata")
- }
-
- /// Tests whether the `compiler` compiling for `target` should be forced to
Index: patches/patch-src_librustc_driver_lib_rs
===================================================================
RCS file: patches/patch-src_librustc_driver_lib_rs
diff -N patches/patch-src_librustc_driver_lib_rs
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_librustc_driver_lib_rs 30 Mar 2018 09:28:44 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+Declare "sse2" feature on amd64 to be always present.
+See https://github.com/rust-lang/rust/issues/46181
+Index: src/librustc_driver/lib.rs
+--- src/librustc_driver/lib.rs.orig
++++ src/librustc_driver/lib.rs
+@@ -130,6 +130,9 @@ pub mod target_features {
+ cfg.insert((tf, Some(feat)));
+ }
+
++ #[cfg(all(target_os="openbsd", target_arch="x86_64"))]
++ cfg.insert((tf, Some(Symbol::intern("sse2"))));
++
+ if sess.crt_static_feature() {
+ cfg.insert((tf, Some(Symbol::intern("crt-static"))));
+ }
Index: patches/patch-src_librustc_driver_target_features_rs
===================================================================
RCS file: patches/patch-src_librustc_driver_target_features_rs
diff -N patches/patch-src_librustc_driver_target_features_rs
--- patches/patch-src_librustc_driver_target_features_rs 4 Dec 2017 17:31:49 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-src_librustc_driver_target_features_rs,v 1.1 2017/12/04 17:31:49 landry Exp $
-Declare "sse2" feature on amd64 to be always present.
-See https://github.com/rust-lang/rust/issues/46181
-Index: src/librustc_driver/target_features.rs
---- src/librustc_driver/target_features.rs.orig
-+++ src/librustc_driver/target_features.rs
-@@ -28,4 +28,7 @@ pub fn add_configuration(cfg: &mut ast::CrateConfig, s
- if sess.crt_static_feature() {
- cfg.insert((tf, Some(Symbol::intern("crt-static"))));
- }
-+
-+ #[cfg(all(target_os="openbsd", target_arch="x86_64"))]
-+ cfg.insert((tf, Some(Symbol::intern("sse2"))));
- }
Index: patches/patch-src_librustdoc_test_rs
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-src_librustdoc_test_rs,v
retrieving revision 1.14
diff -u -p -r1.14 patch-src_librustdoc_test_rs
--- patches/patch-src_librustdoc_test_rs 23 Feb 2018 16:38:16 -0000 1.14
+++ patches/patch-src_librustdoc_test_rs 30 Mar 2018 09:28:44 -0000
@@ -3,7 +3,7 @@ fallback to LOCALBASE as default sysroot
Index: src/librustdoc/test.rs
--- src/librustdoc/test.rs.orig
+++ src/librustdoc/test.rs
-@@ -66,7 +66,10 @@ pub fn run(input_path: &Path,
+@@ -64,7 +64,10 @@ pub fn run(input_path: &Path,
let sessopts = config::Options {
maybe_sysroot: maybe_sysroot.clone().or_else(
@@ -15,7 +15,7 @@ Index: src/librustdoc/test.rs
search_paths: libs.clone(),
crate_types: vec![config::CrateTypeDylib],
externs: externs.clone(),
-@@ -195,7 +198,10 @@ fn run_test(test: &str, cratename: &str, filename: &Fi
+@@ -194,7 +197,10 @@ fn run_test(test: &str, cratename: &str, filename: &Fi
let sessopts = config::Options {
maybe_sysroot: maybe_sysroot.or_else(
Index: patches/patch-src_libstd_sys_unix_stack_overflow_rs
===================================================================
RCS file: /cvs/ports/lang/rust/patches/patch-src_libstd_sys_unix_stack_overflow_rs,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_libstd_sys_unix_stack_overflow_rs
--- patches/patch-src_libstd_sys_unix_stack_overflow_rs 13 Mar 2018 08:08:03 -0000 1.1
+++ patches/patch-src_libstd_sys_unix_stack_overflow_rs 30 Mar 2018 09:28:44 -0000
@@ -3,7 +3,7 @@ Use MAP_STACK for stack allocation.
Index: src/libstd/sys/unix/stack_overflow.rs
--- src/libstd/sys/unix/stack_overflow.rs.orig
+++ src/libstd/sys/unix/stack_overflow.rs
-@@ -144,7 +144,7 @@ mod imp {
+@@ -139,7 +139,7 @@ mod imp {
let stackp = mmap(ptr::null_mut(),
SIGSTKSZ,
PROT_READ | PROT_WRITE,
Index: patches/patch-src_libstd_sys_unix_thread_rs
===================================================================
RCS file: patches/patch-src_libstd_sys_unix_thread_rs
diff -N patches/patch-src_libstd_sys_unix_thread_rs
--- patches/patch-src_libstd_sys_unix_thread_rs 13 Mar 2018 08:08:03 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-src_libstd_sys_unix_thread_rs,v 1.1 2018/03/13 08:08:03 landry Exp $
-Don't change permission on stack for creating a stack_guard page: we already have such thing.
-Index: src/libstd/sys/unix/thread.rs
---- src/libstd/sys/unix/thread.rs.orig
-+++ src/libstd/sys/unix/thread.rs
-@@ -269,7 +269,7 @@ pub mod guard {
- as *mut libc::c_void;
- }
-
-- if cfg!(target_os = "linux") {
-+ if cfg!(target_os = "linux") || cfg!(target_os = "openbsd") {
- // Linux doesn't allocate the whole stack right away, and
- // the kernel has its own stack-guard mechanism to fault
- // when growing too close to an existing mapping. If we map
Index: patches/patch-src_libsyntax_diagnostics_metadata_rs
===================================================================
RCS file: patches/patch-src_libsyntax_diagnostics_metadata_rs
diff -N patches/patch-src_libsyntax_diagnostics_metadata_rs
--- patches/patch-src_libsyntax_diagnostics_metadata_rs 23 Feb 2018 16:38:16 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-$OpenBSD: patch-src_libsyntax_diagnostics_metadata_rs,v 1.1 2018/02/23 16:38:16 landry Exp $
-return metadata_dir as absolute path (8c9bf663d4a8074e4955d1ad3f85a3b82e946297).
-Index: src/libsyntax/diagnostics/metadata.rs
---- src/libsyntax/diagnostics/metadata.rs.orig
-+++ src/libsyntax/diagnostics/metadata.rs
-@@ -15,6 +15,7 @@
-
- use std::collections::BTreeMap;
- use std::path::PathBuf;
-+use std::env;
- use std::fs::{remove_file, create_dir_all, File};
- use std::io::Write;
- use std::error::Error;
-@@ -24,9 +25,6 @@ use syntax_pos::{Span, FileName};
- use ext::base::ExtCtxt;
- use diagnostics::plugin::{ErrorMap, ErrorInfo};
-
--// Default metadata directory to use for extended error JSON.
--const ERROR_METADATA_PREFIX: &'static str = "tmp/extended-errors";
--
- /// JSON encodable/decodable version of `ErrorInfo`.
- #[derive(PartialEq, RustcDecodable, RustcEncodable)]
- pub struct ErrorMetadata {
-@@ -59,7 +57,10 @@ impl ErrorLocation {
- ///
- /// See `output_metadata`.
- pub fn get_metadata_dir(prefix: &str) -> PathBuf {
-- PathBuf::from(ERROR_METADATA_PREFIX).join(prefix)
-+ env::var_os("RUSTC_ERROR_METADATA_DST")
-+ .map(PathBuf::from)
-+ .expect("env var `RUSTC_ERROR_METADATA_DST` isn't set")
-+ .join(prefix)
- }
-
- /// Map `name` to a path in the given directory: <directory>/<name>.json
Index: patches/patch-src_rustllvm_ArchiveWrapper_cpp
===================================================================
RCS file: patches/patch-src_rustllvm_ArchiveWrapper_cpp
diff -N patches/patch-src_rustllvm_ArchiveWrapper_cpp
--- patches/patch-src_rustllvm_ArchiveWrapper_cpp 23 Feb 2018 16:38:16 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,44 +0,0 @@
-$OpenBSD: patch-src_rustllvm_ArchiveWrapper_cpp,v 1.1 2018/02/23 16:38:16 landry Exp $
-Backport patches for LLVM 6 compatibility:
- caedb36f081334451ba83e9524af025891208592
- b6fe1127e4b28aded8a1b0f95340e2de7dc12716
-Index: src/rustllvm/ArchiveWrapper.cpp
---- src/rustllvm/ArchiveWrapper.cpp.orig
-+++ src/rustllvm/ArchiveWrapper.cpp
-@@ -42,7 +42,6 @@ struct RustArchiveIterator {
- enum class LLVMRustArchiveKind {
- Other,
- GNU,
-- MIPS64,
- BSD,
- COFF,
- };
-@@ -51,8 +50,6 @@ static Archive::Kind fromRust(LLVMRustArchiveKind Kind
- switch (Kind) {
- case LLVMRustArchiveKind::GNU:
- return Archive::K_GNU;
-- case LLVMRustArchiveKind::MIPS64:
-- return Archive::K_MIPS64;
- case LLVMRustArchiveKind::BSD:
- return Archive::K_BSD;
- case LLVMRustArchiveKind::COFF:
-@@ -235,9 +232,16 @@ LLVMRustWriteArchive(char *Dst, size_t NumMembers,
- Members.push_back(std::move(*MOrErr));
- }
- }
-- auto Pair = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false);
-- if (!Pair.second)
-+ auto Result = writeArchive(Dst, Members, WriteSymbtab, Kind, true, false);
-+#if LLVM_VERSION_GE(6, 0)
-+ if (!Result)
- return LLVMRustResult::Success;
-- LLVMRustSetLastError(Pair.second.message().c_str());
-+ LLVMRustSetLastError(toString(std::move(Result)).c_str());
-+#else
-+ if (!Result.second)
-+ return LLVMRustResult::Success;
-+ LLVMRustSetLastError(Result.second.message().c_str());
-+
No comments:
Post a Comment