This is an automated email from the ASF dual-hosted git repository. jroesch pushed a commit to branch cargo-build in repository https://gitbox.apache.org/repos/asf/incubator-tvm.git
commit e0f980142c3c0ab795de316943079a651743d8d7 Author: Jared Roesch <roesch...@gmail.com> AuthorDate: Thu Oct 15 01:42:14 2020 -0700 Fix Linux build --- cmake/modules/LLVM.cmake | 7 ++++++- rust/tvm-sys/Cargo.toml | 2 +- rust/tvm-sys/build.rs | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/modules/LLVM.cmake b/cmake/modules/LLVM.cmake index 5f8ace1..ca4ecd6 100644 --- a/cmake/modules/LLVM.cmake +++ b/cmake/modules/LLVM.cmake @@ -16,7 +16,12 @@ # under the License. # LLVM rules -add_definitions(-DDMLC_USE_FOPEN64=0) +# Due to LLVM debug symbols you can sometimes face linking issues on +# certain compiler, platform combinations if you don't set NDEBUG. +# +# See https://github.com/imageworks/OpenShadingLanguage/issues/1069 +# for more discussion. +add_definitions(-DDMLC_USE_FOPEN64=0 -DNDEBUG=1) # Test if ${USE_LLVM} is not an explicit boolean false # It may be a boolean or a string diff --git a/rust/tvm-sys/Cargo.toml b/rust/tvm-sys/Cargo.toml index c25a5bf..2952aa4 100644 --- a/rust/tvm-sys/Cargo.toml +++ b/rust/tvm-sys/Cargo.toml @@ -23,7 +23,7 @@ license = "Apache-2.0" edition = "2018" [features] -default = ["bindings"] +default = [] bindings = [] [dependencies] diff --git a/rust/tvm-sys/build.rs b/rust/tvm-sys/build.rs index 2d86c4b..1590234 100644 --- a/rust/tvm-sys/build.rs +++ b/rust/tvm-sys/build.rs @@ -60,8 +60,7 @@ fn main() -> Result<()> { if cfg!(feature = "bindings") { println!("cargo:rerun-if-env-changed=TVM_HOME"); println!("cargo:rustc-link-lib=dylib=tvm"); - println!("cargo:rustc-link-lib=dylib=llvm-10"); - println!("cargo:rustc-link-search={}/build", tvm_home); + println!("cargo:rustc-link-search=native={}/build", tvm_home); } // @see rust-bindgen#550 for `blacklist_type`