]> git.lizzy.rs Git - rust.git/blob - Cargo.toml
Disable jit and inline-asm when building as part of rustc
[rust.git] / Cargo.toml
1 [package]
2 name = "rustc_codegen_cranelift"
3 version = "0.1.0"
4 authors = ["bjorn3 <bjorn3@users.noreply.github.com>"]
5 edition = "2018"
6
7 [lib]
8 crate-type = ["dylib"]
9
10 [dependencies]
11 # These have to be in sync with each other
12 cranelift-codegen = { git = "https://github.com/bytecodealliance/wasmtime.git", features = ["unwind", "all-arch"] }
13 cranelift-frontend = { git = "https://github.com/bytecodealliance/wasmtime.git" }
14 cranelift-module = { git = "https://github.com/bytecodealliance/wasmtime.git" }
15 cranelift-native = { git = "https://github.com/bytecodealliance/wasmtime.git" }
16 cranelift-jit = { git = "https://github.com/bytecodealliance/wasmtime.git", optional = true }
17 cranelift-object = { git = "https://github.com/bytecodealliance/wasmtime.git" }
18 target-lexicon = "0.12.0"
19 gimli = { version = "0.24.0", default-features = false, features = ["write"]}
20 object = { version = "0.25.0", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }
21
22 ar = { git = "https://github.com/bjorn3/rust-ar.git", branch = "do_not_remove_cg_clif_ranlib" }
23 indexmap = "1.0.2"
24 libloading = { version = "0.6.0", optional = true }
25 smallvec = "1.6.1"
26
27 # Uncomment to use local checkout of cranelift
28 #[patch."https://github.com/bytecodealliance/wasmtime.git"]
29 #cranelift-codegen = { path = "../wasmtime/cranelift/codegen" }
30 #cranelift-frontend = { path = "../wasmtime/cranelift/frontend" }
31 #cranelift-module = { path = "../wasmtime/cranelift/module" }
32 #cranelift-native = { path = "../wasmtime/cranelift/native" }
33 #cranelift-jit = { path = "../wasmtime/cranelift/jit" }
34 #cranelift-object = { path = "../wasmtime/cranelift/object" }
35
36 #[patch.crates-io]
37 #gimli = { path = "../" }
38
39 [features]
40 # Enable features not ready to be enabled when compiling as part of rustc
41 unstable-features = ["jit", "inline_asm"]
42 jit = ["cranelift-jit", "libloading"]
43 inline_asm = []
44
45 [profile.dev]
46 # By compiling dependencies with optimizations, performing tests gets much faster.
47 opt-level = 3
48
49 [profile.dev.package.rustc_codegen_cranelift]
50 # Disabling optimizations for cg_clif itself makes compilation after a change faster.
51 opt-level = 0
52
53 [profile.release.package.rustc_codegen_cranelift]
54 incremental = true
55
56 # Disable optimizations and debuginfo of build scripts and some of the heavy build deps, as the
57 # execution time of build scripts is so fast that optimizing them slows down the total build time.
58 [profile.dev.build-override]
59 opt-level = 0
60 debug = false
61
62 [profile.release.build-override]
63 opt-level = 0
64 debug = false
65
66 [profile.dev.package.cranelift-codegen-meta]
67 opt-level = 0
68 debug = false
69
70 [profile.release.package.cranelift-codegen-meta]
71 opt-level = 0
72 debug = false
73
74 [package.metadata.rust-analyzer]
75 rustc_private = true