blob: 1bb82ce6ccbbdf8fdbdde083ec30d1e4dbee70ec [file] [log] [blame]
Brian Silverman4e662aa2022-05-11 23:10:19 -07001// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4// https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5// <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6// option. This file may not be copied, modified, or distributed
7// except according to those terms.
8
9use std::path::PathBuf;
10fn main() -> miette::Result<()> {
11 let mut b = autocxx_build::Builder::new(
12 "src/lib.rs",
13 &[
14 PathBuf::from("/usr/include/llvm-13"),
15 PathBuf::from("/usr/include/llvm-c-13"),
16 ],
17 )
18 .build()?;
19
20 b.flag_if_supported("-std=c++14").compile("llvm");
21 println!("cargo:rerun-if-changed=src/lib.rs");
22 Ok(())
23}