From cea904e6183e980ebd9e61ced1472953dc7101e2 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Fri, 26 Apr 2019 03:31:56 +0000 Subject: [PATCH] Build custom libgc --- .circleci/config.yml | 3 ++- .gitmodules | 6 +++++ Cargo.lock | 26 +++++++++++++++++++ Cargo.toml | 5 ++++ README.md | 2 +- build.rs | 37 +++++++++++++++++++++++++++ examples/borrow_check_free/Cargo.lock | 26 +++++++++++++++++++ examples/dynamic_threads/Cargo.lock | 26 +++++++++++++++++++ examples/gc_free/Cargo.lock | 26 +++++++++++++++++++ examples/static_threads/Cargo.lock | 26 +++++++++++++++++++ src/lib.rs | 2 +- vendor/bdwgc | 1 + vendor/libatomic_ops | 1 + 13 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 .gitmodules create mode 100644 build.rs create mode 160000 vendor/bdwgc create mode 160000 vendor/libatomic_ops diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fd497f..f715ac0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,8 @@ jobs: - image: rust steps: - run: apt -y update --fix-missing - - run: apt -y install libgc-dev + - run: apt -y install cmake - checkout + - run: git submodule update --init --recursive - run: cargo build - run: cd examples && ./test.sh diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..284c541 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "vendor/bdwgc"] + path = vendor/bdwgc + url = https://github.com/raviqqe/bdwgc +[submodule "vendor/libatomic_ops"] + path = vendor/libatomic_ops + url = https://github.com/ivmai/libatomic_ops diff --git a/Cargo.lock b/Cargo.lock index caef28e..49bc55b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,16 +1,42 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +[[package]] +name = "autotools" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "bdwgc-alloc" version = "0.2.1" dependencies = [ + "autotools 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", + "cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "cc" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" + +[[package]] +name = "cmake" +version = "0.1.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", +] + [[package]] name = "libc" version = "0.2.51" source = "registry+https://github.com/rust-lang/crates.io-index" [metadata] +"checksum autotools 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "774fd1b2d459a939302a0bad631a3de176b8bd5f87cbfc28ceb1f6c18d731094" +"checksum cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)" = "5e5f3fee5eeb60324c2781f1e41286bdee933850fff9b3c672587fed5ec58c83" +"checksum cmake 0.1.38 (registry+https://github.com/rust-lang/crates.io-index)" = "96210eec534fc3fbfc0452a63769424eaa80205fda6cea98e5b61cb3d97bcec8" "checksum libc 0.2.51 (registry+https://github.com/rust-lang/crates.io-index)" = "bedcc7a809076656486ffe045abeeac163da1b558e963a31e29fbfbeba916917" diff --git a/Cargo.toml b/Cargo.toml index 60cca5b..894ca00 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,6 +6,11 @@ authors = ["swgillespie ", "Yota Toyama c_void; fn GC_free(ptr: *mut c_void); diff --git a/vendor/bdwgc b/vendor/bdwgc new file mode 160000 index 0000000..51a44b9 --- /dev/null +++ b/vendor/bdwgc @@ -0,0 +1 @@ +Subproject commit 51a44b9cdb0f28e60509a6d930e7787163d110c4 diff --git a/vendor/libatomic_ops b/vendor/libatomic_ops new file mode 160000 index 0000000..6287479 --- /dev/null +++ b/vendor/libatomic_ops @@ -0,0 +1 @@ +Subproject commit 6287479564021893f2bf81149d0738bcb492b81c