-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Arch Migrator #11
Open
regro-cf-autotick-bot
wants to merge
18
commits into
conda-forge:main
Choose a base branch
from
regro-cf-autotick-bot:bot-pr_arch_h5a61c9
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+296
−36
Open
Arch Migrator #11
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
121f5ae
migration: ArchRebuild
regro-cf-autotick-bot 34b8476
MNT: Re-rendered with conda-build 3.21.9, conda-smithy 3.21.1, and co…
regro-cf-autotick-bot 0416139
disable ppc64le (not supported by deno-ffi)
msarahan 9748d6e
remove ppc64le via rerender
msarahan b85e17d
try to obtain temporary debugging info
msarahan 75de01e
explicitly set parallelism for cargo build to limit RAM
msarahan 903f16a
hide verbose/debug options in hopes of freeing memory
msarahan e353438
use linux-64 cross compiler for linux-aarch64
msarahan 5c15ee8
restore parallelism since we are cross-compiling
msarahan ea6539f
MNT: Re-rendered with conda-build 3.21.9, conda-smithy 3.21.1, and co…
msarahan 85b1848
add patch to use autotools-rs for tinycc
msarahan 24fe695
tweak build vars
msarahan b2370ed
libffi stuff
msarahan 1a71e7d
set CARGO_TARGET_..._RUSTFLAGS
msarahan 3e25ec7
squash and rework patches
msarahan c2682ea
allow cross
msarahan 2a28f3a
Per target flags for both prefixes
isuruf 7cff46e
Update build.sh
isuruf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
BUILD: | ||
- aarch64-conda_cos7-linux-gnu | ||
c_compiler: | ||
- gcc | ||
c_compiler_version: | ||
- '10' | ||
cdt_arch: | ||
- aarch64 | ||
cdt_name: | ||
- cos7 | ||
channel_sources: | ||
- conda-forge | ||
channel_targets: | ||
- conda-forge main | ||
docker_image: | ||
- quay.io/condaforge/linux-anvil-cos7-x86_64 | ||
rust_compiler: | ||
- rust | ||
target_platform: | ||
- linux-aarch64 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
build_platform: | ||
osx_arm64: osx_64 | ||
linux_aarch64: linux_64 | ||
conda_forge_output_validation: true | ||
github: | ||
branch_name: main | ||
tooling_branch_name: main | ||
provider: | ||
linux_aarch64: default | ||
linux_ppc64le: default | ||
test: native_and_emulated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
From a2274b56938ce2eb460533ece60573b2b16b49b8 Mon Sep 17 00:00:00 2001 | ||
From: Michael Sarahan <[email protected]> | ||
Date: Tue, 6 Sep 2022 16:17:33 -0500 | ||
Subject: [PATCH 1/3] use autotools-rs for building tinycc | ||
|
||
--- | ||
Cargo.lock | 10 ++++++++++ | ||
ext/ffi/Cargo.toml | 3 +++ | ||
ext/ffi/build.rs | 34 +++++++++++----------------------- | ||
3 files changed, 24 insertions(+), 23 deletions(-) | ||
|
||
diff --git a/Cargo.lock b/Cargo.lock | ||
index 447fea548..4db9913ad 100644 | ||
--- a/Cargo.lock | ||
+++ b/Cargo.lock | ||
@@ -233,6 +233,15 @@ version = "1.1.0" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" | ||
|
||
+[[package]] | ||
+name = "autotools" | ||
+version = "0.2.5" | ||
+source = "registry+https://github.com/rust-lang/crates.io-index" | ||
+checksum = "c8138adefca3e5d2e73bfba83bd6eeaf904b26a7ac1b4a19892cfe16cc7e1701" | ||
+dependencies = [ | ||
+ "cc", | ||
+] | ||
+ | ||
[[package]] | ||
name = "base16ct" | ||
version = "0.1.1" | ||
@@ -1033,6 +1042,7 @@ dependencies = [ | ||
name = "deno_ffi" | ||
version = "0.53.0" | ||
dependencies = [ | ||
+ "autotools", | ||
"deno_core", | ||
"dlopen", | ||
"libffi", | ||
diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml | ||
index b233a5747..05d417ad2 100644 | ||
--- a/ext/ffi/Cargo.toml | ||
+++ b/ext/ffi/Cargo.toml | ||
@@ -13,6 +13,9 @@ description = "Dynamic library ffi for deno" | ||
[lib] | ||
path = "lib.rs" | ||
|
||
+[build-dependencies] | ||
+autotools = "0.2" | ||
+ | ||
[dependencies] | ||
deno_core = { version = "0.148.0", path = "../../core" } | ||
dlopen = "0.1.8" | ||
diff --git a/ext/ffi/build.rs b/ext/ffi/build.rs | ||
index 1debd6b9c..fbdcbe58d 100644 | ||
--- a/ext/ffi/build.rs | ||
+++ b/ext/ffi/build.rs | ||
@@ -1,8 +1,10 @@ | ||
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license. | ||
|
||
+ | ||
#[cfg(not(target_os = "windows"))] | ||
fn build_tcc() { | ||
use std::env; | ||
+ use autotools::Config; | ||
|
||
{ | ||
// TODO(@littledivy): Windows support for fast call. | ||
@@ -21,35 +23,21 @@ fn build_tcc() { | ||
#[cfg(not(target_os = "windows"))] | ||
{ | ||
use std::path::PathBuf; | ||
- use std::process::exit; | ||
- use std::process::Command; | ||
|
||
let root = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"))); | ||
let tcc_src = root.join("tinycc"); | ||
dbg!(&tcc_src); | ||
- let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap()); | ||
- let mut configure = Command::new(tcc_src.join("configure")); | ||
- configure.current_dir(&out_dir); | ||
- configure.args(&["--enable-static", "--extra-cflags=-fPIC -O3 -g -static"]); | ||
- let status = configure.status().unwrap(); | ||
- if !status.success() { | ||
- eprintln!("Fail to configure: {:?}", status); | ||
- exit(1); | ||
- } | ||
|
||
- let mut make = Command::new("make"); | ||
- make.current_dir(&out_dir).arg(format!( | ||
- "-j{}", | ||
- env::var("NUM_JOBS").unwrap_or_else(|_| String::from("1")) | ||
- )); | ||
- make.args(&["libtcc.a"]); | ||
- let status = make.status().unwrap(); | ||
+ let dst = Config::new("tinycc") | ||
+ .enable("static", None) | ||
+ .cflag("-fPIC") | ||
+ .cflag("-O3") | ||
+ .cflag("-g") | ||
+ .cflag("-static") | ||
+ .make_target("libtcc.a") | ||
+ .build(); | ||
|
||
- if !status.success() { | ||
- eprintln!("Fail to make: {:?}", status); | ||
- exit(1); | ||
- } | ||
- println!("cargo:rustc-link-search=native={}", out_dir.display()); | ||
+ println!("cargo:rustc-link-search=native={}", dst.join("build").display()); | ||
println!("cargo:rerun-if-changed={}", tcc_src.display()); | ||
} | ||
} | ||
-- | ||
2.34.1 | ||
|
36 changes: 36 additions & 0 deletions
36
recipe/0002-explicitly-add-libffi-system-dep-for-cross-compiling.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
From 7e205d19ffdf149e1744f89e544129b6d5132ecd Mon Sep 17 00:00:00 2001 | ||
From: Michael Sarahan <[email protected]> | ||
Date: Tue, 6 Sep 2022 21:13:06 -0500 | ||
Subject: [PATCH 2/3] explicitly add libffi system dep for cross compiling | ||
|
||
--- | ||
ext/ffi/Cargo.toml | 2 +- | ||
ext/ffi/build.rs | 1 + | ||
2 files changed, 2 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/ext/ffi/Cargo.toml b/ext/ffi/Cargo.toml | ||
index 05d417ad2..7763d2d83 100644 | ||
--- a/ext/ffi/Cargo.toml | ||
+++ b/ext/ffi/Cargo.toml | ||
@@ -19,7 +19,7 @@ autotools = "0.2" | ||
[dependencies] | ||
deno_core = { version = "0.148.0", path = "../../core" } | ||
dlopen = "0.1.8" | ||
-libffi = "3.0.0" | ||
+libffi = { version="3.0.1", features=["system"] } | ||
serde = { version = "1.0.129", features = ["derive"] } | ||
tokio = { version = "1.17", features = ["full"] } | ||
|
||
diff --git a/ext/ffi/build.rs b/ext/ffi/build.rs | ||
index fbdcbe58d..ddd8eeca6 100644 | ||
--- a/ext/ffi/build.rs | ||
+++ b/ext/ffi/build.rs | ||
@@ -55,4 +55,5 @@ fn main() { | ||
build_tcc(); | ||
} | ||
println!("cargo:rustc-link-lib=static=tcc"); | ||
+ println!("cargo:rustc-link-lib=ffi"); | ||
} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
From 470aaf847f24ad68b576c574e7e134894b4c5e2a Mon Sep 17 00:00:00 2001 | ||
From: Michael Sarahan <[email protected]> | ||
Date: Wed, 7 Sep 2022 10:09:20 -0500 | ||
Subject: [PATCH 3/3] allow cross | ||
|
||
--- | ||
Cargo.lock | 11 ++--------- | ||
cli/build.rs | 6 ------ | ||
ext/ffi/build.rs | 1 - | ||
3 files changed, 2 insertions(+), 16 deletions(-) | ||
|
||
diff --git a/Cargo.lock b/Cargo.lock | ||
index 4db9913ad..5f78eda64 100644 | ||
--- a/Cargo.lock | ||
+++ b/Cargo.lock | ||
@@ -12,12 +12,6 @@ dependencies = [ | ||
"regex", | ||
] | ||
|
||
-[[package]] | ||
-name = "abort_on_panic" | ||
-version = "2.0.0" | ||
-source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "955f37ac58af2416bac687c8ab66a4ccba282229bd7422a28d2281a5e66a6116" | ||
- | ||
[[package]] | ||
name = "adler" | ||
version = "1.0.2" | ||
@@ -2521,11 +2515,10 @@ checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" | ||
|
||
[[package]] | ||
name = "libffi" | ||
-version = "3.0.0" | ||
+version = "3.0.1" | ||
source = "registry+https://github.com/rust-lang/crates.io-index" | ||
-checksum = "0e08093a2ddeee94bd0c830a53d895ff91f1f3bb0f9b3c8c6b00739cdf76bc1d" | ||
+checksum = "1e454b3efb16fba3b17810ae5e41df02b649e564ab3c5a34b3b93ed07ad287e6" | ||
dependencies = [ | ||
- "abort_on_panic", | ||
"libc", | ||
"libffi-sys", | ||
] | ||
diff --git a/cli/build.rs b/cli/build.rs | ||
index 1a4eaa425..668864b19 100644 | ||
--- a/cli/build.rs | ||
+++ b/cli/build.rs | ||
@@ -324,12 +324,6 @@ fn main() { | ||
return; | ||
} | ||
|
||
- // Host snapshots won't work when cross compiling. | ||
- let target = env::var("TARGET").unwrap(); | ||
- let host = env::var("HOST").unwrap(); | ||
- if target != host { | ||
- panic!("Cross compiling with snapshot is not supported."); | ||
- } | ||
// To debug snapshot issues uncomment: | ||
// op_fetch_asset::trace_serializer(); | ||
|
||
diff --git a/ext/ffi/build.rs b/ext/ffi/build.rs | ||
index ddd8eeca6..fbdcbe58d 100644 | ||
--- a/ext/ffi/build.rs | ||
+++ b/ext/ffi/build.rs | ||
@@ -55,5 +55,4 @@ fn main() { | ||
build_tcc(); | ||
} | ||
println!("cargo:rustc-link-lib=static=tcc"); | ||
- println!("cargo:rustc-link-lib=ffi"); | ||
} | ||
-- | ||
2.34.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's going on here? bad copy-paste?