From d6d8a330f86c1a71e9fa3d896718b10662ac3ff8 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Sun, 18 Nov 2018 18:06:31 +0100 Subject: [PATCH 1/2] Add rustc_codegen_ssa to sysroot --- Cargo.lock | 19 ++++++++++++++++++- src/librustc_codegen_llvm/Cargo.toml | 1 - src/librustc_codegen_ssa/Cargo.toml | 19 +++++++++++++++++++ src/librustc_driver/Cargo.toml | 4 ++++ 4 files changed, 41 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0dd693e7217e7..44c787e74ad02 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2160,7 +2160,6 @@ dependencies = [ "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc_codegen_ssa 0.0.0", "rustc_llvm 0.0.0", ] @@ -2168,10 +2167,27 @@ dependencies = [ name = "rustc_codegen_ssa" version = "0.0.0" dependencies = [ + "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", "cc 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "jobserver 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.43 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", "memmap 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc 0.0.0", "rustc-demangle 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_allocator 0.0.0", + "rustc_apfloat 0.0.0", + "rustc_codegen_utils 0.0.0", + "rustc_data_structures 0.0.0", + "rustc_errors 0.0.0", + "rustc_fs_util 0.0.0", + "rustc_incremental 0.0.0", + "rustc_mir 0.0.0", + "rustc_target 0.0.0", + "serialize 0.0.0", + "syntax 0.0.0", + "syntax_pos 0.0.0", ] [[package]] @@ -2230,6 +2246,7 @@ dependencies = [ "rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_allocator 0.0.0", "rustc_borrowck 0.0.0", + "rustc_codegen_ssa 0.0.0", "rustc_codegen_utils 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", diff --git a/src/librustc_codegen_llvm/Cargo.toml b/src/librustc_codegen_llvm/Cargo.toml index 34017009c2838..b711502b14b7f 100644 --- a/src/librustc_codegen_llvm/Cargo.toml +++ b/src/librustc_codegen_llvm/Cargo.toml @@ -13,7 +13,6 @@ test = false cc = "1.0.1" num_cpus = "1.0" rustc-demangle = "0.1.4" -rustc_codegen_ssa = { path = "../librustc_codegen_ssa" } rustc_llvm = { path = "../librustc_llvm" } memmap = "0.6" diff --git a/src/librustc_codegen_ssa/Cargo.toml b/src/librustc_codegen_ssa/Cargo.toml index a158c34f9d1c2..7b1c7cfb56f4c 100644 --- a/src/librustc_codegen_ssa/Cargo.toml +++ b/src/librustc_codegen_ssa/Cargo.toml @@ -6,10 +6,29 @@ version = "0.0.0" [lib] name = "rustc_codegen_ssa" path = "lib.rs" +crate-type = ["dylib"] test = false [dependencies] +bitflags = "1.0.4" cc = "1.0.1" num_cpus = "1.0" rustc-demangle = "0.1.4" memmap = "0.6" +log = "0.4.5" +libc = "0.2.43" +jobserver = "0.1.11" + +serialize = { path = "../libserialize" } +syntax = { path = "../libsyntax" } +syntax_pos = { path = "../libsyntax_pos" } +rustc = { path = "../librustc" } +rustc_allocator = { path = "../librustc_allocator" } +rustc_apfloat = { path = "../librustc_apfloat" } +rustc_codegen_utils = { path = "../librustc_codegen_utils" } +rustc_data_structures = { path = "../librustc_data_structures"} +rustc_errors = { path = "../librustc_errors" } +rustc_fs_util = { path = "../librustc_fs_util" } +rustc_incremental = { path = "../librustc_incremental" } +rustc_mir = { path = "../librustc_mir" } +rustc_target = { path = "../librustc_target" } diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index 1e32f5ef6f0b6..d37186b61d3d9 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -39,6 +39,10 @@ smallvec = { version = "0.6.5", features = ["union"] } syntax_ext = { path = "../libsyntax_ext" } syntax_pos = { path = "../libsyntax_pos" } +# Make sure rustc_codegen_ssa ends up in the sysroot, because this +# crate is intended to be used by codegen backends, which may not be in-tree. +rustc_codegen_ssa = { path = "../librustc_codegen_ssa" } + [dependencies.jemalloc-sys] version = '0.1.8' optional = true From 60e4158188b6f580e8fe44f5a52edd3f06e62a83 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Mon, 19 Nov 2018 18:28:44 +0100 Subject: [PATCH 2/2] Move fake rustc_codegen_ssa dependency from rustc_driver to rustc-main --- Cargo.lock | 2 +- src/librustc_driver/Cargo.toml | 4 ---- src/rustc/Cargo.toml | 4 ++++ 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 44c787e74ad02..9f109997ad505 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2064,6 +2064,7 @@ dependencies = [ name = "rustc-main" version = "0.0.0" dependencies = [ + "rustc_codegen_ssa 0.0.0", "rustc_driver 0.0.0", "rustc_target 0.0.0", ] @@ -2246,7 +2247,6 @@ dependencies = [ "rustc-rayon 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_allocator 0.0.0", "rustc_borrowck 0.0.0", - "rustc_codegen_ssa 0.0.0", "rustc_codegen_utils 0.0.0", "rustc_data_structures 0.0.0", "rustc_errors 0.0.0", diff --git a/src/librustc_driver/Cargo.toml b/src/librustc_driver/Cargo.toml index d37186b61d3d9..1e32f5ef6f0b6 100644 --- a/src/librustc_driver/Cargo.toml +++ b/src/librustc_driver/Cargo.toml @@ -39,10 +39,6 @@ smallvec = { version = "0.6.5", features = ["union"] } syntax_ext = { path = "../libsyntax_ext" } syntax_pos = { path = "../libsyntax_pos" } -# Make sure rustc_codegen_ssa ends up in the sysroot, because this -# crate is intended to be used by codegen backends, which may not be in-tree. -rustc_codegen_ssa = { path = "../librustc_codegen_ssa" } - [dependencies.jemalloc-sys] version = '0.1.8' optional = true diff --git a/src/rustc/Cargo.toml b/src/rustc/Cargo.toml index ec822fddef3eb..32969d09e8567 100644 --- a/src/rustc/Cargo.toml +++ b/src/rustc/Cargo.toml @@ -11,5 +11,9 @@ path = "rustc.rs" rustc_target = { path = "../librustc_target" } rustc_driver = { path = "../librustc_driver" } +# Make sure rustc_codegen_ssa ends up in the sysroot, because this +# crate is intended to be used by codegen backends, which may not be in-tree. +rustc_codegen_ssa = { path = "../librustc_codegen_ssa" } + [features] jemalloc = ['rustc_driver/jemalloc-sys']