Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
pull_request_rules:
- name: backport patches to v1.8.2+RAI
conditions:
- base=master
- label=backport-v1.8.2+RAI
actions:
backport:
branches:
- v1.8.2+RAI
assignees:
- "{{ author }}"
label_conflicts: backport-conflicts
- name: backport patches to v1.9.2+RAI
conditions:
- base=master
- label=backport-v1.9.2+RAI
actions:
backport:
branches:
- v1.9.2+RAI
assignees:
- "{{ author }}"
label_conflicts: backport-conflicts
- name: backport patches to dev
conditions:
- base=master
- label=backport-dev
actions:
backport:
branches:
- dev
assignees:
- "{{ author }}"
label_conflicts: backport-conflicts
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ julia-debug:
# Clean up the build artifacts
clean:
@echo "Cleaning up build artifacts in $(JULIA_PATH) and $(MMTK_JULIA_DIR)";
@cd $(JULIA_PATH) && make clean
@cd $(MMTK_JULIA_DIR)mmtk && cargo clean

.PHONY: release debug julia julia-debug clean
6 changes: 3 additions & 3 deletions mmtk/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mmtk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lazy_static = "1.1"
# - change branch
# - change repo name
# But other changes including adding/removing whitespaces in commented lines may break the CI
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "c0f97884234b51b13c8ba5d1563a8e0f592d11c2" }
mmtk = { git = "https://github.com/mmtk/mmtk-core.git", rev = "ac80c8de8ac551959839dfaa79e87c1a05a9e89c" }
# Uncomment the following to build locally
# mmtk = { path = "../repos/mmtk-core" }
log = {version = "0.4", features = ["max_level_trace", "release_max_level_off"] }
Expand Down
84 changes: 43 additions & 41 deletions mmtk/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,48 +44,50 @@ fn main() {
.expect("failed to execute process");
}

let bindings = bindgen::Builder::default()
.header(format!("{}/src/julia.h", julia_dir))
.header(format!("{}/src/julia_internal.h", julia_dir))
// Including the paths to depending .h files
.clang_arg("-I")
.clang_arg(format!("{}/mmtk/api", mmtk_dir))
.clang_arg("-I")
.clang_arg(format!("{}/src", julia_dir))
.clang_arg("-I")
.clang_arg(format!("{}/src/support", julia_dir))
.clang_arg("-I")
.clang_arg(format!("{}/usr/include", buildroot_dir))
// all types that we generate bindings from
.allowlist_item("jl_datatype_layout_t")
.allowlist_item("jl_ucontext_t")
.allowlist_item("jl_small_typeof_tags")
.allowlist_item("jl_*_tag")
.allowlist_item("jl_svec_t")
.allowlist_item("jl_module_t")
.allowlist_item("jl_task_t")
.allowlist_item("jl_datatype_t")
.allowlist_item("jl_weakref_t")
.allowlist_item("jl_binding_partition_t")
.allowlist_item("jl_bt_element_t")
.allowlist_item("jl_taggedvalue_t")
.allowlist_item("MMTkMutatorContext")
// --opaque-type MMTkMutatorContext
.opaque_type("MMTkMutatorContext")
// compile using c++
.clang_arg("-x")
.clang_arg("c++")
.clang_arg("-std=c++14")
// using MMTK types
.clang_arg("-DMMTK_GC")
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings");
if !Path::new(format!("{}/mmtk/src/julia_types.rs", mmtk_dir).as_str()).exists() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using format! should work, just like those existing lines that contain format!. But my intuition tells me it is more robust to use Path::join of PathBuf to construct paths. We may investigate it later, but the current change looks good to me.

let bindings = bindgen::Builder::default()
.header(format!("{}/src/julia.h", julia_dir))
.header(format!("{}/src/julia_internal.h", julia_dir))
// Including the paths to depending .h files
.clang_arg("-I")
.clang_arg(format!("{}/mmtk/api", mmtk_dir))
.clang_arg("-I")
.clang_arg(format!("{}/src", julia_dir))
.clang_arg("-I")
.clang_arg(format!("{}/src/support", julia_dir))
.clang_arg("-I")
.clang_arg(format!("{}/usr/include", buildroot_dir))
// all types that we generate bindings from
.allowlist_item("jl_datatype_layout_t")
.allowlist_item("jl_ucontext_t")
.allowlist_item("jl_small_typeof_tags")
.allowlist_item("jl_*_tag")
.allowlist_item("jl_svec_t")
.allowlist_item("jl_module_t")
.allowlist_item("jl_task_t")
.allowlist_item("jl_datatype_t")
.allowlist_item("jl_weakref_t")
.allowlist_item("jl_binding_partition_t")
.allowlist_item("jl_bt_element_t")
.allowlist_item("jl_taggedvalue_t")
.allowlist_item("MMTkMutatorContext")
// --opaque-type MMTkMutatorContext
.opaque_type("MMTkMutatorContext")
// compile using c++
.clang_arg("-x")
.clang_arg("c++")
.clang_arg("-std=c++14")
// using MMTK types
.clang_arg("-DMMTK_GC")
// Finish the builder and generate the bindings.
.generate()
// Unwrap the Result and panic on failure.
.expect("Unable to generate bindings");

bindings
.write_to_file("src/julia_types.rs")
.expect("Couldn't write bindings!");
bindings
.write_to_file("src/julia_types.rs")
.expect("Couldn't write bindings!");
}

built::write_built_file().expect("Failed to acquire build-time information");
}
2 changes: 1 addition & 1 deletion mmtk/rust-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.77.0
1.83.0
Loading