Skip to content

Commit b1ce741

Browse files
committed
Build 1.35.0
1 parent 3043b0c commit b1ce741

File tree

4 files changed

+98
-0
lines changed

4 files changed

+98
-0
lines changed

1.35.0/build.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/sh
2+
3+
RUSTC_BOOTSTRAP_VERSION=1.34.2
4+
CARGO_BOOTSTRAP_VERSION=0.35.0
5+
RUST_VERSION=1.35.0
6+
7+
CONFIGURE_CARGO_STATIC_FLAGS="--enable-cargo-native-static"
8+
9+
# XXX: miri does not build correctly that's why we need the flag below.
10+
ADDITIONAL_CONFIGURE_FLAGS="--enable-missing-tools"
11+
12+
BASE=`pwd`
13+
DEST=$1
14+
LLVM_ROOT=""
15+
16+
. ../checksums.sh
17+
. ../common.sh
18+
19+
fixup-vendor() {
20+
fixup-vendor-patch openssl-src src/lib.rs || exit 1
21+
}
22+
23+
RUN info clean extract prepatch fixup-vendor config xbuild xdist inst 2>&1
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--- src/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake.orig 2018-03-10 02:51:13 UTC
2+
+++ src/llvm-project/llvm/cmake/modules/HandleLLVMOptions.cmake
3+
@@ -146,6 +146,7 @@ endif()
4+
# build might work on ELF but fail on MachO/COFF.
5+
if(NOT (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" OR WIN32 OR CYGWIN OR
6+
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
7+
+ ${CMAKE_SYSTEM_NAME} MATCHES "DragonFly" OR
8+
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND
9+
NOT LLVM_USE_SANITIZER)
10+
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
--- src/llvm-project/llvm/lib/Support/Unix/Path.inc.orig 2018-04-04 15:39:54 UTC
2+
+++ src/llvm-project/llvm/lib/Support/Unix/Path.inc
3+
@@ -68,13 +68,13 @@
4+
5+
#include <sys/types.h>
6+
#if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && \
7+
- !defined(__linux__)
8+
+ !defined(__DragonFly__) && !defined(__linux__)
9+
#include <sys/statvfs.h>
10+
#define STATVFS statvfs
11+
#define FSTATVFS fstatvfs
12+
#define STATVFS_F_FRSIZE(vfs) vfs.f_frsize
13+
#else
14+
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
15+
+#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
16+
#include <sys/mount.h>
17+
#include <sys/param.h>
18+
#elif defined(__linux__)
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
--- vendor/openssl-src/src/lib.rs.orig 2018-12-08 18:57:16 UTC
2+
+++ vendor/openssl-src/src/lib.rs
3+
@@ -51,6 +51,13 @@ impl Build {
4+
self
5+
}
6+
7+
+ fn cmd_make(&self) -> Command {
8+
+ match &self.host.as_ref().expect("HOST dir not set")[..] {
9+
+ "x86_64-unknown-dragonfly" => Command::new("gmake"),
10+
+ _ => Command::new("make"),
11+
+ }
12+
+ }
13+
+
14+
pub fn build(&mut self) -> Artifacts {
15+
let target = &self.target.as_ref().expect("TARGET dir not set")[..];
16+
let host = &self.host.as_ref().expect("HOST dir not set")[..];
17+
@@ -161,6 +168,7 @@ impl Build {
18+
"x86_64-pc-windows-gnu" => "mingw64",
19+
"x86_64-pc-windows-msvc" => "VC-WIN64A",
20+
"x86_64-unknown-freebsd" => "BSD-x86_64",
21+
+ "x86_64-unknown-dragonfly" => "BSD-x86_64",
22+
"x86_64-unknown-linux-gnu" => "linux-x86_64",
23+
"x86_64-unknown-linux-musl" => "linux-x86_64",
24+
"x86_64-unknown-netbsd" => "BSD-x86_64",
25+
@@ -264,11 +272,11 @@ impl Build {
26+
install.arg("install_sw").current_dir(&inner_dir);
27+
self.run_command(install, "installing OpenSSL");
28+
} else {
29+
- let mut depend = Command::new("make");
30+
+ let mut depend = self.cmd_make();
31+
depend.arg("depend").current_dir(&inner_dir);
32+
self.run_command(depend, "building OpenSSL dependencies");
33+
34+
- let mut build = Command::new("make");
35+
+ let mut build = self.cmd_make();
36+
build.current_dir(&inner_dir);
37+
if !cfg!(windows) {
38+
if let Some(s) = env::var_os("CARGO_MAKEFLAGS") {
39+
@@ -277,7 +285,7 @@ impl Build {
40+
}
41+
self.run_command(build, "building OpenSSL");
42+
43+
- let mut install = Command::new("make");
44+
+ let mut install = self.cmd_make();
45+
install.arg("install_sw").current_dir(&inner_dir);
46+
self.run_command(install, "installing OpenSSL");
47+
}

0 commit comments

Comments
 (0)