This repository has been archived by the owner on May 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.rs
61 lines (56 loc) · 2.13 KB
/
build.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
#[cfg(feature = "docs-rs")]
fn main() {}
#[cfg(not(feature = "docs-rs"))]
fn main() {
use std::env;
let mut cxx = cxx_build::bridge("src/ffi/mod.rs");
let out_dir = env::var("OUT_DIR").unwrap();
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
cxx.files(&[
"arrow/cpp/src/arrow/util/future.cc",
"arrow/cpp/src/arrow/util/string.cc",
"arrow/cpp/src/arrow/util/logging.cc",
"arrow/cpp/src/arrow/util/thread_pool.cc",
"arrow/cpp/src/arrow/util/string_builder.cc",
"arrow/cpp/src/arrow/device.cc",
"arrow/cpp/src/arrow/result.cc",
"arrow/cpp/src/arrow/buffer.cc",
"arrow/cpp/src/arrow/status.cc",
"arrow/cpp/src/plasma/common.cc",
"arrow/cpp/src/plasma/fling.cc",
"arrow/cpp/src/plasma/io.cc",
"arrow/cpp/src/arrow/io/memory.cc",
"arrow/cpp/src/arrow/io/interfaces.cc",
"arrow/cpp/src/arrow/util/memory.cc",
"arrow/cpp/src/arrow/util/io_util.cc",
"arrow/cpp/src/arrow/memory_pool.cc",
"arrow/cpp/src/plasma/malloc.cc",
"arrow/cpp/src/plasma/protocol.cc",
"arrow/cpp/src/plasma/plasma.cc",
"arrow/cpp/src/plasma/client.cc",
])
.flag_if_supported("-std=c++14")
.include("arrow/cpp/src/")
.include("arrow/cpp/thirdparty/flatbuffers/include")
.opt_level(3)
// TODO: CUDA support
.flag_if_supported("-fwrapv")
.flag_if_supported("-fomit-frame-pointer")
.flag_if_supported("-funroll-loops")
// ignore some warnings
.flag_if_supported("-Wno-redundant-move")
.flag_if_supported("-Wno-unused-function")
.flag_if_supported("-Wno-unused-parameter")
.flag_if_supported("-Wno-unused-variable")
.file("src/ffi/ffi.cc")
.include(manifest_dir)
.include(out_dir)
.compile("plasma");
println!("cargo:rerun-if-changed=src/ffi/mod.rs");
println!("cargo:rerun-if-changed=src/ffi/ffi.h");
println!("cargo:rerun-if-changed=src/ffi/ffi.cc");
}