mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
make inkwell a workspace dependency
This commit is contained in:
parent
b907f01f1f
commit
2c23a106f2
10 changed files with 38 additions and 54 deletions
19
Cargo.lock
generated
19
Cargo.lock
generated
|
@ -1769,13 +1769,6 @@ version = "1.0.7"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "adab1eaa3408fb7f0c777a73e7465fd5656136fc93b670eb6df3c88c2c1344e3"
|
||||
|
||||
[[package]]
|
||||
name = "inkwell"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"inkwell 0.1.0 (git+https://github.com/roc-lang/inkwell?branch=master)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "inkwell"
|
||||
version = "0.1.0"
|
||||
|
@ -3322,7 +3315,7 @@ name = "roc_build"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"inkwell 0.1.0",
|
||||
"inkwell",
|
||||
"libloading",
|
||||
"roc_builtins",
|
||||
"roc_can",
|
||||
|
@ -3395,7 +3388,7 @@ dependencies = [
|
|||
"criterion",
|
||||
"errno",
|
||||
"indoc",
|
||||
"inkwell 0.1.0",
|
||||
"inkwell",
|
||||
"libc",
|
||||
"libloading",
|
||||
"mimalloc",
|
||||
|
@ -3649,7 +3642,7 @@ name = "roc_gen_llvm"
|
|||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"inkwell 0.1.0",
|
||||
"inkwell",
|
||||
"morphic_lib",
|
||||
"roc_alias_analysis",
|
||||
"roc_builtins",
|
||||
|
@ -3903,7 +3896,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"bumpalo",
|
||||
"const_format",
|
||||
"inkwell 0.1.0",
|
||||
"inkwell",
|
||||
"libloading",
|
||||
"roc_build",
|
||||
"roc_builtins",
|
||||
|
@ -3953,7 +3946,7 @@ version = "0.0.1"
|
|||
dependencies = [
|
||||
"bumpalo",
|
||||
"indoc",
|
||||
"inkwell 0.1.0",
|
||||
"inkwell",
|
||||
"libc",
|
||||
"libloading",
|
||||
"pretty_assertions",
|
||||
|
@ -4843,7 +4836,7 @@ dependencies = [
|
|||
"bumpalo",
|
||||
"criterion",
|
||||
"indoc",
|
||||
"inkwell 0.1.0",
|
||||
"inkwell",
|
||||
"lazy_static",
|
||||
"libc",
|
||||
"libloading",
|
||||
|
|
20
Cargo.toml
20
Cargo.toml
|
@ -43,6 +43,26 @@ exclude = [
|
|||
# workspace, and without `resolver = "2"` here, you can't use `-p` like this.
|
||||
resolver = "2"
|
||||
|
||||
[workspace.dependencies]
|
||||
# NOTE: roc-lang/inkwell is a fork of TheDan64/inkwell which does not change anything.
|
||||
#
|
||||
# The reason for this fork is that the way Inkwell is designed, you have to use
|
||||
# a particular branch (e.g. "llvm8-0") in Cargo.toml. That would be fine, except that
|
||||
# breaking changes get pushed directly to that branch, which breaks our build
|
||||
# without warning.
|
||||
#
|
||||
# We tried referencing a specific rev on TheDan64/inkwell directly (instead of branch),
|
||||
# but although that worked locally, it did not work on GitHub Actions. (After a few
|
||||
# hours of investigation, gave up trying to figure out why.) So this is the workaround:
|
||||
# having an immutable tag on the roc-lang/inkwell fork which points to
|
||||
# a particular "release" of Inkwell.
|
||||
#
|
||||
# When we want to update Inkwell, we can sync up roc-lang/inkwell to the latest
|
||||
# commit of TheDan64/inkwell, push a new tag which points to the latest commit,
|
||||
# change the tag value in this Cargo.toml to point to that tag, and `cargo update`.
|
||||
# This way, GitHub Actions works and nobody's builds get broken.
|
||||
inkwell = { git = "https://github.com/roc-lang/inkwell", branch = "master", features = [ "llvm13-0" ] }
|
||||
|
||||
# Optimizations based on https://deterministic.space/high-performance-rust.html
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
|
|
|
@ -75,9 +75,10 @@ wasmer-wasi = { version = "2.2.1", optional = true }
|
|||
strum = { version = "0.24.1", features = ["derive"] }
|
||||
libloading = "0.7.1"
|
||||
roc_gen_llvm = {path = "../compiler/gen_llvm"}
|
||||
inkwell = {path = "../vendor/inkwell"}
|
||||
signal-hook = "0.3.14"
|
||||
|
||||
inkwell.workspace = true
|
||||
|
||||
# for now, uses unix/libc functions that windows does not support
|
||||
[target.'cfg(not(windows))'.dependencies]
|
||||
roc_repl_expect = { path = "../repl_expect" }
|
||||
|
|
|
@ -31,10 +31,11 @@ roc_utils = { path = "../../utils" }
|
|||
bumpalo = { version = "3.11.0", features = ["collections"] }
|
||||
libloading = "0.7.1"
|
||||
tempfile = "3.2.0"
|
||||
inkwell = { path = "../../vendor/inkwell" }
|
||||
target-lexicon = "0.12.3"
|
||||
wasi_libc_sys = { path = "../../wasi-libc-sys" }
|
||||
|
||||
inkwell.workspace = true
|
||||
|
||||
[target.'cfg(target_os = "macos")'.dependencies]
|
||||
serde_json = "1.0.85"
|
||||
|
||||
|
|
|
@ -19,5 +19,6 @@ roc_debug_flags = { path = "../debug_flags" }
|
|||
roc_region = { path = "../region" }
|
||||
morphic_lib = { path = "../../vendor/morphic_lib" }
|
||||
bumpalo = { version = "3.11.0", features = ["collections"] }
|
||||
inkwell = { path = "../../vendor/inkwell" }
|
||||
target-lexicon = "0.12.3"
|
||||
|
||||
inkwell.workspace = true
|
||||
|
|
|
@ -41,7 +41,6 @@ roc_std = { path = "../../roc_std" }
|
|||
roc_debug_flags = {path="../debug_flags"}
|
||||
bumpalo = { version = "3.11.0", features = ["collections"] }
|
||||
libc = "0.2.135"
|
||||
inkwell = { path = "../../vendor/inkwell" }
|
||||
target-lexicon = "0.12.3"
|
||||
libloading = "0.7.1"
|
||||
tempfile = "3.2.0"
|
||||
|
@ -50,6 +49,8 @@ criterion = { git = "https://github.com/Anton-4/criterion.rs" }
|
|||
wasm3 = { git = "https://github.com/roc-lang/wasm3-rs", rev = "f0f807d1fc0a50d1d68e5799e54ee62c05af00f5" }
|
||||
lazy_static = "1.4.0"
|
||||
|
||||
inkwell.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["gen-llvm"]
|
||||
gen-llvm = []
|
||||
|
|
|
@ -16,9 +16,10 @@ target-x86 = ["roc_build/target-x86"]
|
|||
target-x86_64 = ["roc_build/target-x86_64"]
|
||||
|
||||
[dependencies]
|
||||
inkwell.workspace = true
|
||||
|
||||
bumpalo = {version = "3.11.0", features = ["collections"]}
|
||||
const_format = { version = "0.2.23", features = ["const_generics"] }
|
||||
inkwell = {path = "../vendor/inkwell"}
|
||||
libloading = "0.7.1"
|
||||
rustyline = {git = "https://github.com/roc-lang/rustyline", rev = "e74333c"}
|
||||
rustyline-derive = {git = "https://github.com/roc-lang/rustyline", rev = "e74333c"}
|
||||
|
|
|
@ -29,10 +29,11 @@ roc_build = { path = "../compiler/build" }
|
|||
roc_error_macros = { path = "../error_macros" }
|
||||
|
||||
libloading = "0.7.1"
|
||||
inkwell = { path = "../vendor/inkwell" }
|
||||
signal-hook = "0.3.14"
|
||||
libc = "0.2.135"
|
||||
|
||||
inkwell.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
test_gen = { path = "../compiler/test_gen" }
|
||||
roc_build = { path = "../compiler/build", features = ["target-aarch64", "target-x86_64"] }
|
||||
|
|
31
crates/vendor/inkwell/Cargo.toml
vendored
31
crates/vendor/inkwell/Cargo.toml
vendored
|
@ -1,31 +0,0 @@
|
|||
[package]
|
||||
name = "inkwell"
|
||||
version = "0.1.0"
|
||||
authors = ["The Roc Contributors"]
|
||||
license = "UPL-1.0"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
# NOTE: roc-lang/inkwell is a fork of TheDan64/inkwell which does not change anything.
|
||||
#
|
||||
# The reason for this fork is that the way Inkwell is designed, you have to use
|
||||
# a particular branch (e.g. "llvm8-0") in Cargo.toml. That would be fine, except that
|
||||
# breaking changes get pushed directly to that branch, which breaks our build
|
||||
# without warning.
|
||||
#
|
||||
# We tried referencing a specific rev on TheDan64/inkwell directly (instead of branch),
|
||||
# but although that worked locally, it did not work on GitHub Actions. (After a few
|
||||
# hours of investigation, gave up trying to figure out why.) So this is the workaround:
|
||||
# having an immutable tag on the roc-lang/inkwell fork which points to
|
||||
# a particular "release" of Inkwell.
|
||||
#
|
||||
# When we want to update Inkwell, we can sync up roc-lang/inkwell to the latest
|
||||
# commit of TheDan64/inkwell, push a new tag which points to the latest commit,
|
||||
# change the tag value in this Cargo.toml to point to that tag, and `cargo update`.
|
||||
# This way, GitHub Actions works and nobody's builds get broken.
|
||||
inkwell = { git = "https://github.com/roc-lang/inkwell", branch = "master", features = [ "llvm13-0" ] }
|
||||
|
||||
[features]
|
||||
target-arm = []
|
||||
target-aarch64 = []
|
||||
target-webassembly = []
|
4
crates/vendor/inkwell/src/lib.rs
vendored
4
crates/vendor/inkwell/src/lib.rs
vendored
|
@ -1,4 +0,0 @@
|
|||
#![cfg(not(doctest))]
|
||||
// re-export all inkwell members. This way we can switch
|
||||
// inkwell versions by making changes in just one place.
|
||||
pub use inkwell::*;
|
Loading…
Add table
Add a link
Reference in a new issue