Skip to content

Commit 6465c18

Browse files
committed
Update docker builds to also use Linux for fd
1 parent 1ed8530 commit 6465c18

File tree

7 files changed

+66
-195
lines changed

7 files changed

+66
-195
lines changed

build.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -532,14 +532,14 @@ class RipGrep(BenchmarkSuite):
532532

533533
@property
534534
def cmd_args(self):
535-
return f"-j1 $(cat {str(Path('aux/ripgrep_args').resolve())}/%(benchmark)s) {str(RipGrep.LINUX.src)}"
535+
return f"-j1 $(cat {str(Path('aux/ripgrep_args').resolve())}/%(benchmark)s) {str(LINUX.src)}"
536536

537537
def build(self, c, target_dir, install_dir, bench_cfg_bin, profile, env):
538-
artefacts.LINUX.fetch()
538+
LINUX.fetch()
539539
self.RIPGREP.fetch()
540540

541-
if not (self.LINUX.src / ".config").exists():
542-
with c.cd(str(self.LINUX.src)):
541+
if not (LINUX.src / ".config").exists():
542+
with c.cd(str(LINUX.src)):
543543
c.run(f"make defconfig")
544544
c.run(f"make -j100")
545545

patch/grmtools.gc.diff

Lines changed: 0 additions & 63 deletions
This file was deleted.

patch/grmtools.rc.diff

Lines changed: 0 additions & 63 deletions
This file was deleted.

patch/ripgrep.gc.diff

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/crates/core/main.rs b/crates/core/main.rs
2-
index 64f35ce..4465c9b 100644
2+
index 64f35ce..8521fcb 100644
33
--- a/crates/core/main.rs
44
+++ b/crates/core/main.rs
55
@@ -2,6 +2,8 @@
@@ -11,7 +11,7 @@ index 64f35ce..4465c9b 100644
1111
use std::{io::Write, process::ExitCode};
1212

1313
use ignore::WalkState;
14-
@@ -16,28 +18,8 @@ mod haystack;
14+
@@ -16,29 +18,6 @@ mod haystack;
1515
mod logger;
1616
mod search;
1717

@@ -35,12 +35,12 @@ index 64f35ce..4465c9b 100644
3535
-// Moreover, we only do this on 64-bit systems since jemalloc doesn't support
3636
-// i686.
3737
-#[cfg(all(target_env = "musl", target_pointer_width = "64"))]
38-
#[global_allocator]
38+
-#[global_allocator]
3939
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
40-
+static ALLOC: std::gc::GcAllocator = std::gc::GcAllocator;
41-
40+
-
4241
/// Then, as it was, then again it will be.
4342
fn main() -> ExitCode {
43+
match run(flags::parse()) {
4444
diff --git a/crates/globset/src/lib.rs b/crates/globset/src/lib.rs
4545
index e804e12..2c43805 100644
4646
--- a/crates/globset/src/lib.rs

patch/ripgrep.rc.diff

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
diff --git a/crates/core/main.rs b/crates/core/main.rs
2-
index 64f35ce..4465c9b 100644
2+
index 64f35ce..9e3a32e 100644
33
--- a/crates/core/main.rs
44
+++ b/crates/core/main.rs
5-
@@ -2,6 +2,8 @@
6-
The main entry point into ripgrep.
7-
*/
8-
9-
+#![feature(gc)]
10-
+
11-
use std::{io::Write, process::ExitCode};
12-
13-
use ignore::WalkState;
14-
@@ -16,28 +18,8 @@ mod haystack;
5+
@@ -16,29 +16,6 @@ mod haystack;
156
mod logger;
167
mod search;
178

@@ -35,9 +26,9 @@ index 64f35ce..4465c9b 100644
3526
-// Moreover, we only do this on 64-bit systems since jemalloc doesn't support
3627
-// i686.
3728
-#[cfg(all(target_env = "musl", target_pointer_width = "64"))]
38-
#[global_allocator]
29+
-#[global_allocator]
3930
-static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
40-
+static ALLOC: std::gc::GcAllocator = std::gc::GcAllocator;
41-
31+
-
4232
/// Then, as it was, then again it will be.
4333
fn main() -> ExitCode {
34+
match run(flags::parse()) {

patch/som-rs.gc.diff

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -375,10 +375,10 @@ index 6556412..b20ef73 100644
375375
-pub type SOMWeakRef<T> = Weak<RefCell<T>>;
376376
+pub type SOMRef<T> = Gc<RefCell<T>>;
377377
diff --git a/som-interpreter-ast/src/main.rs b/som-interpreter-ast/src/main.rs
378-
index 6658bd0..2a27b6a 100644
378+
index 6658bd0..9ea24bf 100644
379379
--- a/som-interpreter-ast/src/main.rs
380380
+++ b/som-interpreter-ast/src/main.rs
381-
@@ -1,10 +1,11 @@
381+
@@ -1,15 +1,14 @@
382382
//!
383383
//! This is the interpreter for the Simple Object Machine.
384384
//!
@@ -391,7 +391,12 @@ index 6658bd0..2a27b6a 100644
391391

392392
use anyhow::anyhow;
393393
use clap::Parser;
394-
@@ -17,10 +18,6 @@ use som_interpreter_ast::invokable::Return;
394+
-#[cfg(feature = "jemalloc")]
395+
-use jemallocator::Jemalloc;
396+
397+
mod shell;
398+
399+
@@ -17,10 +16,6 @@ use som_interpreter_ast::invokable::Return;
395400
use som_interpreter_ast::universe::Universe;
396401
use som_interpreter_ast::value::Value;
397402

@@ -402,7 +407,7 @@ index 6658bd0..2a27b6a 100644
402407
#[derive(Debug, Clone, PartialEq, clap::StructOpt)]
403408
#[structopt(about, author)]
404409
struct Options {
405-
@@ -65,7 +62,7 @@ fn main() -> anyhow::Result<()> {
410+
@@ -65,7 +60,7 @@ fn main() -> anyhow::Result<()> {
406411

407412
let args = std::iter::once(String::from(file_stem))
408413
.chain(opts.args.iter().cloned())
@@ -411,7 +416,7 @@ index 6658bd0..2a27b6a 100644
411416
.map(Value::String)
412417
.collect();
413418

414-
@@ -75,7 +72,7 @@ fn main() -> anyhow::Result<()> {
419+
@@ -75,7 +70,7 @@ fn main() -> anyhow::Result<()> {
415420

416421
// let class = universe.load_class_from_path(file)?;
417422
// let instance = Instance::from_class(class);
@@ -1301,25 +1306,21 @@ index 5ee4521..cda4c2b 100644
13011306
Literal::Block(val) => Value::Block(val),
13021307
};
13031308
diff --git a/som-interpreter-bc/src/lib.rs b/som-interpreter-bc/src/lib.rs
1304-
index 2ede99f..1696f3c 100644
1309+
index 2ede99f..4847c03 100644
13051310
--- a/som-interpreter-bc/src/lib.rs
13061311
+++ b/som-interpreter-bc/src/lib.rs
1307-
@@ -2,8 +2,13 @@
1312+
@@ -2,8 +2,9 @@
13081313
//! This is the interpreter for the Simple Object Machine.
13091314
//!
13101315

13111316
+#![feature(gc)]
13121317
use std::cell::RefCell;
13131318
-use std::rc::{Rc, Weak};
13141319
+use std::gc::Gc;
1315-
+use std::gc::GcAllocator;
1316-
+
1317-
+#[global_allocator]
1318-
+static A: GcAllocator = GcAllocator;
13191320

13201321
/// Facilities for manipulating blocks.
13211322
pub mod block;
1322-
@@ -33,6 +38,4 @@ pub mod universe;
1323+
@@ -33,6 +34,4 @@ pub mod universe;
13231324
pub mod value;
13241325

13251326
/// A strong and owning reference to an object.
@@ -1328,10 +1329,10 @@ index 2ede99f..1696f3c 100644
13281329
-pub type SOMWeakRef<T> = Weak<RefCell<T>>;
13291330
+pub type SOMRef<T> = Gc<RefCell<T>>;
13301331
diff --git a/som-interpreter-bc/src/main.rs b/som-interpreter-bc/src/main.rs
1331-
index 62aa750..951bf39 100644
1332+
index 62aa750..552f6d8 100644
13321333
--- a/som-interpreter-bc/src/main.rs
13331334
+++ b/som-interpreter-bc/src/main.rs
1334-
@@ -1,10 +1,11 @@
1335+
@@ -1,15 +1,14 @@
13351336
//!
13361337
//! This is the interpreter for the Simple Object Machine.
13371338
//!
@@ -1344,7 +1345,12 @@ index 62aa750..951bf39 100644
13441345

13451346
use anyhow::{bail, Context};
13461347
use clap::Parser;
1347-
@@ -19,10 +20,6 @@ use som_interpreter_bc::method::{Method, MethodKind};
1348+
-#[cfg(feature = "jemalloc")]
1349+
-use jemallocator::Jemalloc;
1350+
1351+
mod shell;
1352+
1353+
@@ -19,10 +18,6 @@ use som_interpreter_bc::method::{Method, MethodKind};
13481354
use som_interpreter_bc::universe::Universe;
13491355
use som_interpreter_bc::value::Value;
13501356

@@ -1355,7 +1361,7 @@ index 62aa750..951bf39 100644
13551361
#[derive(Debug, Clone, PartialEq, clap::StructOpt)]
13561362
#[clap(about, author)]
13571363
struct Options {
1358-
@@ -74,7 +71,7 @@ fn main() -> anyhow::Result<()> {
1364+
@@ -74,7 +69,7 @@ fn main() -> anyhow::Result<()> {
13591365

13601366
let args = std::iter::once(String::from(file_stem))
13611367
.chain(opts.args.iter().cloned())
@@ -1364,7 +1370,7 @@ index 62aa750..951bf39 100644
13641370
.map(Value::String)
13651371
.collect();
13661372

1367-
@@ -86,7 +83,7 @@ fn main() -> anyhow::Result<()> {
1373+
@@ -86,7 +81,7 @@ fn main() -> anyhow::Result<()> {
13681374

13691375
// let class = universe.load_class_from_path(file)?;
13701376
// let instance = som_interpreter::instance::Instance::from_class(class);
@@ -1373,7 +1379,7 @@ index 62aa750..951bf39 100644
13731379

13741380
// let invokable = instance.lookup_method(&universe, "run").unwrap();
13751381
// let output = som_interpreter::invokable::Invoke::invoke(invokable.as_ref(), &mut universe, vec![instance]);
1376-
@@ -119,7 +116,7 @@ fn disassemble_class(opts: Options) -> anyhow::Result<()> {
1382+
@@ -119,7 +114,7 @@ fn disassemble_class(opts: Options) -> anyhow::Result<()> {
13771383

13781384
let class = universe.load_class(file_stem)?;
13791385

0 commit comments

Comments
 (0)