Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 13 pull requests #64200

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
6896ed3
use wasi crate
newpavlov Aug 19, 2019
23cc850
return 0 from errno function
newpavlov Aug 19, 2019
cb52065
replace libc::nanosleep with wasi::poll_oneoff
newpavlov Aug 19, 2019
75a553f
remove to_string
newpavlov Aug 19, 2019
7a4f0ae
use wasi::get_args
newpavlov Aug 19, 2019
52d2871
use wasi::get_environ
newpavlov Aug 19, 2019
8394dbb
remove libc import
newpavlov Aug 19, 2019
338fc7d
use non-zero clock id
newpavlov Aug 19, 2019
7658a13
typo fix
newpavlov Aug 19, 2019
e5ba80a
use const
newpavlov Aug 19, 2019
c052376
fix
newpavlov Aug 19, 2019
744442d
fix C incompatibilities
newpavlov Aug 20, 2019
7daf890
Merge branch 'master' into wasi
newpavlov Aug 20, 2019
4dee102
use new get_args
newpavlov Aug 20, 2019
88fd945
update args
newpavlov Aug 21, 2019
a47e3c0
fixes
newpavlov Aug 21, 2019
926f364
move cvt
newpavlov Aug 21, 2019
3772146
Merge branch 'master' into wasi
newpavlov Aug 24, 2019
6374b84
update to wasi v0.7
newpavlov Aug 29, 2019
06acfb2
add wasi license to the licenses whitelist
newpavlov Aug 29, 2019
127311b
whitelist wasi crate
newpavlov Aug 29, 2019
0a757df
Update libc to 0.2.62
mati865 Aug 30, 2019
9fd203a
simplify code
newpavlov Aug 30, 2019
6ed50f4
Rename test locals to work around LLDB bug
ranweiler Sep 1, 2019
991f436
Fix regex replacement in theme detection
GuillaumeGomez Sep 2, 2019
0662fcf
make wasi a target-specific dependency
newpavlov Sep 3, 2019
cb84aa4
Improve searching in rustdoc and add tests
ayuusweetfish Sep 2, 2019
53fe764
Assume non-git LLVM is fresh if the stamp file exists
cuviper Sep 4, 2019
af06bfb
resolve: extract `resolve_params`.
Centril Aug 28, 2019
f8835ee
resolve: cleanup using `with_rib`, etc.
Centril Aug 28, 2019
6d537d4
resolve: simplify `resolve_arm`.
Centril Aug 28, 2019
219ddde
resolve: extract `try_resolve_as_non_binding`.
Centril Aug 28, 2019
f343e84
resolve: add `type IdentMap<T>` alias.
Centril Aug 28, 2019
fd3b441
resolve: move `fresh_binding`.
Centril Aug 28, 2019
dc91e22
resolve: move `resolve_block` to a better place.
Centril Aug 28, 2019
70cae78
resolve: already-bound-check: account for or-patterns.
Centril Aug 28, 2019
166a558
resolve: revamp already-bound check -- fix some bugs.
Centril Sep 1, 2019
498ec59
resolve: add tests for already-bound check.
Centril Sep 1, 2019
896a1c7
resolve: account for general or-patterns in consistency checking.
Centril Sep 1, 2019
33317c7
resolve: add test for missing bindings in or-patterns.
Centril Sep 1, 2019
aa7a02b
resolve: test binding mode consistency for or-patterns.
Centril Sep 1, 2019
dbe6873
resolve: test consistent or-patterns being allowed.
Centril Sep 3, 2019
ca968a1
or-patterns: syntax: simplify `Arm.pats` and `ExprKind::Let.0`.
Centril Aug 27, 2019
998060b
or-patterns: syntax: adjust `visit` and `mut_visit`.
Centril Aug 27, 2019
ad3db72
or-patterns: syntax: adjust parser removing a hack.
Centril Aug 27, 2019
424492a
or-patterns: syntax: adjust pretty printing.
Centril Aug 27, 2019
76625eb
or-patterns: syntax: adjust derive, format, and building.
Centril Aug 27, 2019
3fccbac
or-patterns: adjust librustc_lint.
Centril Aug 27, 2019
d8ef907
or-patterns: adjust lowering of `ast::Arm` & `ast::ExprKind::Let`.
Centril Aug 28, 2019
a867c5f
resolve: merge `resolve_pats` and `resolve_pattern_top`.
Centril Sep 1, 2019
be95dee
or-patterns: adjust save_analysis wrt. `process_var_decl{_multi}`.
Centril Sep 2, 2019
d70b0c5
or-patterns: fix pprust-expr-roundtrip due to AST change.
Centril Sep 3, 2019
a7db1a4
or-patterns: address review comments.
Centril Sep 4, 2019
0341b78
resolve: bool -> enum PatBoundCtx
Centril Sep 4, 2019
485697b
Better way of conditioning the sanitizer builds
infinity0 Sep 5, 2019
16ba502
or-patterns: fix fallout from #664128.
Centril Sep 5, 2019
bafff2d
Update Clippy
tesuji Sep 5, 2019
d4d5aa4
Fix invalid span generation when it should be div
GuillaumeGomez Sep 5, 2019
0b7ba6e
std: Improve downstream codegen in `Command::env`
alexcrichton Sep 4, 2019
060fe88
fill metadata in rustc_lexer's Cargo.toml
matklad Sep 5, 2019
bb1e425
Add Fuchsia to actually_monotonic
cramertj Sep 5, 2019
b457caa
Rollup merge of #63676 - newpavlov:wasi, r=alexcrichton
Mark-Simulacrum Sep 6, 2019
3691051
Rollup merge of #64019 - mati865:libc, r=alexcrichton
Mark-Simulacrum Sep 6, 2019
206596c
Rollup merge of #64052 - ranweiler:debuginfo-boxed-struct-64050, r=al…
Mark-Simulacrum Sep 6, 2019
8dab014
Rollup merge of #64094 - kawa-yoiko:rustdoc-search, r=GuillaumeGomez
Mark-Simulacrum Sep 6, 2019
5f1acb7
Rollup merge of #64096 - GuillaumeGomez:theme-regex-fix, r=Mark-Simul…
Mark-Simulacrum Sep 6, 2019
a24934b
Rollup merge of #64111 - Centril:ast-only-patkind-or, r=petrochenkov
Mark-Simulacrum Sep 6, 2019
9dda232
Rollup merge of #64156 - cuviper:gitless-llvm, r=alexcrichton
Mark-Simulacrum Sep 6, 2019
a313f6c
Rollup merge of #64166 - infinity0:master, r=alexcrichton
Mark-Simulacrum Sep 6, 2019
da1a049
Rollup merge of #64171 - lzutao:clippy-fix, r=oli-obk
Mark-Simulacrum Sep 6, 2019
9e477bf
Rollup merge of #64175 - GuillaumeGomez:replace-span-when-it-should-b…
Mark-Simulacrum Sep 6, 2019
775c9e5
Rollup merge of #64186 - alexcrichton:improve-env-codegen, r=sfackler
Mark-Simulacrum Sep 6, 2019
d909170
Rollup merge of #64190 - matklad:meta, r=cramertj
Mark-Simulacrum Sep 6, 2019
16ee07e
Rollup merge of #64198 - cramertj:fuchsia-monotonic, r=alexcrichton
Mark-Simulacrum Sep 6, 2019
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
16 changes: 14 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1583,9 +1583,9 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"

[[package]]
name = "libc"
version = "0.2.61"
version = "0.2.62"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c665266eb592905e8503ba3403020f4b8794d26263f412ca33171600eca9a6fa"
checksum = "34fcd2c08d2f832f376f4173a231990fa5aef4e99fb569867318a227ef4c06ba"
dependencies = [
"rustc-std-workspace-core",
]
Expand Down Expand Up @@ -3870,6 +3870,7 @@ dependencies = [
"rustc_msan",
"rustc_tsan",
"unwind",
"wasi",
]

[[package]]
Expand Down Expand Up @@ -4686,6 +4687,17 @@ dependencies = [
"try-lock",
]

[[package]]
name = "wasi"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core",
]

[[package]]
name = "winapi"
version = "0.2.8"
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ pub fn std_cargo(builder: &Builder<'_>,
emscripten: false,
});
cargo.env("LLVM_CONFIG", llvm_config);
cargo.env("RUSTC_BUILD_SANITIZERS", "1");
}

cargo.arg("--features").arg(features)
Expand Down
27 changes: 14 additions & 13 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,29 @@ impl Step for Llvm {
(info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin"))
};

if !llvm_info.is_git() {
println!(
"git could not determine the LLVM submodule commit hash. \
Assuming that an LLVM build is necessary.",
);
}

let build_llvm_config = llvm_config_ret_dir
.join(exe("llvm-config", &*builder.config.build));
let done_stamp = out_dir.join("llvm-finished-building");

if let Some(llvm_commit) = llvm_info.sha() {
if done_stamp.exists() {
if done_stamp.exists() {
if let Some(llvm_commit) = llvm_info.sha() {
let done_contents = t!(fs::read(&done_stamp));

// If LLVM was already built previously and the submodule's commit didn't change
// from the previous build, then no action is required.
if done_contents == llvm_commit.as_bytes() {
return build_llvm_config
return build_llvm_config;
}
} else {
builder.info(
"Could not determine the LLVM submodule commit hash. \
Assuming that an LLVM rebuild is not necessary.",
);
builder.info(&format!(
"To force LLVM to rebuild, remove the file `{}`",
done_stamp.display()
));
return build_llvm_config;
}
}

Expand Down Expand Up @@ -303,9 +306,7 @@ impl Step for Llvm {

cfg.build();

if let Some(llvm_commit) = llvm_info.sha() {
t!(fs::write(&done_stamp, llvm_commit));
}
t!(fs::write(&done_stamp, llvm_info.sha().unwrap_or("")));

build_llvm_config
}
Expand Down
41 changes: 33 additions & 8 deletions src/librustc/hir/lowering.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,19 +425,44 @@ impl<'a> LoweringContext<'a> {

impl<'tcx, 'interner> Visitor<'tcx> for MiscCollector<'tcx, 'interner> {
fn visit_pat(&mut self, p: &'tcx Pat) {
match p.node {
if let PatKind::Paren(..) | PatKind::Rest = p.node {
// Doesn't generate a HIR node
PatKind::Paren(..) | PatKind::Rest => {},
_ => {
if let Some(owner) = self.hir_id_owner {
self.lctx.lower_node_id_with_owner(p.id, owner);
}
}
};
} else if let Some(owner) = self.hir_id_owner {
self.lctx.lower_node_id_with_owner(p.id, owner);
}

visit::walk_pat(self, p)
}

// HACK(or_patterns; Centril | dlrobertson): Avoid creating
// HIR nodes for `PatKind::Or` for the top level of a `ast::Arm`.
// This is a temporary hack that should go away once we push down
// `arm.pats: HirVec<P<Pat>>` -> `arm.pat: P<Pat>` to HIR. // Centril
fn visit_arm(&mut self, arm: &'tcx Arm) {
match &arm.pat.node {
PatKind::Or(pats) => pats.iter().for_each(|p| self.visit_pat(p)),
_ => self.visit_pat(&arm.pat),
}
walk_list!(self, visit_expr, &arm.guard);
self.visit_expr(&arm.body);
walk_list!(self, visit_attribute, &arm.attrs);
}

// HACK(or_patterns; Centril | dlrobertson): Same as above. // Centril
fn visit_expr(&mut self, e: &'tcx Expr) {
if let ExprKind::Let(pat, scrutinee) = &e.node {
walk_list!(self, visit_attribute, e.attrs.iter());
match &pat.node {
PatKind::Or(pats) => pats.iter().for_each(|p| self.visit_pat(p)),
_ => self.visit_pat(&pat),
}
self.visit_expr(scrutinee);
self.visit_expr_post(e);
return;
}
visit::walk_expr(self, e)
}

fn visit_item(&mut self, item: &'tcx Item) {
let hir_id = self.lctx.allocate_hir_id_counter(item.id);

Expand Down
77 changes: 39 additions & 38 deletions src/librustc/hir/lowering/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl LoweringContext<'_> {
let ohs = P(self.lower_expr(ohs));
hir::ExprKind::AddrOf(m, ohs)
}
ExprKind::Let(ref pats, ref scrutinee) => self.lower_expr_let(e.span, pats, scrutinee),
ExprKind::Let(ref pat, ref scrutinee) => self.lower_expr_let(e.span, pat, scrutinee),
ExprKind::If(ref cond, ref then, ref else_opt) => {
self.lower_expr_if(e.span, cond, then, else_opt.as_deref())
}
Expand Down Expand Up @@ -227,16 +227,11 @@ impl LoweringContext<'_> {
}
}

/// Emit an error and lower `ast::ExprKind::Let(pats, scrutinee)` into:
/// Emit an error and lower `ast::ExprKind::Let(pat, scrutinee)` into:
/// ```rust
/// match scrutinee { pats => true, _ => false }
/// ```
fn lower_expr_let(
&mut self,
span: Span,
pats: &[AstP<Pat>],
scrutinee: &Expr
) -> hir::ExprKind {
fn lower_expr_let(&mut self, span: Span, pat: &Pat, scrutinee: &Expr) -> hir::ExprKind {
// If we got here, the `let` expression is not allowed.
self.sess
.struct_span_err(span, "`let` expressions are not supported here")
Expand All @@ -246,23 +241,23 @@ impl LoweringContext<'_> {

// For better recovery, we emit:
// ```
// match scrutinee { pats => true, _ => false }
// match scrutinee { pat => true, _ => false }
// ```
// While this doesn't fully match the user's intent, it has key advantages:
// 1. We can avoid using `abort_if_errors`.
// 2. We can typeck both `pats` and `scrutinee`.
// 3. `pats` is allowed to be refutable.
// 2. We can typeck both `pat` and `scrutinee`.
// 3. `pat` is allowed to be refutable.
// 4. The return type of the block is `bool` which seems like what the user wanted.
let scrutinee = self.lower_expr(scrutinee);
let then_arm = {
let pats = pats.iter().map(|pat| self.lower_pat(pat)).collect();
let pat = self.lower_pat_top_hack(pat);
let expr = self.expr_bool(span, true);
self.arm(pats, P(expr))
self.arm(pat, P(expr))
};
let else_arm = {
let pats = hir_vec![self.pat_wild(span)];
let pat = self.pat_wild(span);
let expr = self.expr_bool(span, false);
self.arm(pats, P(expr))
self.arm(hir_vec![pat], P(expr))
};
hir::ExprKind::Match(
P(scrutinee),
Expand Down Expand Up @@ -291,13 +286,12 @@ impl LoweringContext<'_> {
// Handle then + scrutinee:
let then_blk = self.lower_block(then, false);
let then_expr = self.expr_block(then_blk, ThinVec::new());
let (then_pats, scrutinee, desugar) = match cond.node {
let (then_pat, scrutinee, desugar) = match cond.node {
// `<pat> => <then>`:
ExprKind::Let(ref pats, ref scrutinee) => {
ExprKind::Let(ref pat, ref scrutinee) => {
let scrutinee = self.lower_expr(scrutinee);
let pats = pats.iter().map(|pat| self.lower_pat(pat)).collect();
let desugar = hir::MatchSource::IfLetDesugar { contains_else_clause };
(pats, scrutinee, desugar)
let pat = self.lower_pat_top_hack(pat);
(pat, scrutinee, hir::MatchSource::IfLetDesugar { contains_else_clause })
}
// `true => <then>`:
_ => {
Expand All @@ -312,13 +306,11 @@ impl LoweringContext<'_> {
// to preserve drop semantics since `if cond { ... }` does not
// let temporaries live outside of `cond`.
let cond = self.expr_drop_temps(span_block, P(cond), ThinVec::new());

let desugar = hir::MatchSource::IfDesugar { contains_else_clause };
let pats = hir_vec![self.pat_bool(span, true)];
(pats, cond, desugar)
let pat = self.pat_bool(span, true);
(hir_vec![pat], cond, hir::MatchSource::IfDesugar { contains_else_clause })
}
};
let then_arm = self.arm(then_pats, P(then_expr));
let then_arm = self.arm(then_pat, P(then_expr));

hir::ExprKind::Match(P(scrutinee), vec![then_arm, else_arm].into(), desugar)
}
Expand All @@ -345,8 +337,8 @@ impl LoweringContext<'_> {
// Handle then + scrutinee:
let then_blk = self.lower_block(body, false);
let then_expr = self.expr_block(then_blk, ThinVec::new());
let (then_pats, scrutinee, desugar, source) = match cond.node {
ExprKind::Let(ref pats, ref scrutinee) => {
let (then_pat, scrutinee, desugar, source) = match cond.node {
ExprKind::Let(ref pat, ref scrutinee) => {
// to:
//
// [opt_ident]: loop {
Expand All @@ -356,9 +348,8 @@ impl LoweringContext<'_> {
// }
// }
let scrutinee = self.with_loop_condition_scope(|t| t.lower_expr(scrutinee));
let pats = pats.iter().map(|pat| self.lower_pat(pat)).collect();
let desugar = hir::MatchSource::WhileLetDesugar;
(pats, scrutinee, desugar, hir::LoopSource::WhileLet)
let pat = self.lower_pat_top_hack(pat);
(pat, scrutinee, hir::MatchSource::WhileLetDesugar, hir::LoopSource::WhileLet)
}
_ => {
// We desugar: `'label: while $cond $body` into:
Expand All @@ -383,14 +374,12 @@ impl LoweringContext<'_> {
// to preserve drop semantics since `while cond { ... }` does not
// let temporaries live outside of `cond`.
let cond = self.expr_drop_temps(span_block, P(cond), ThinVec::new());

let desugar = hir::MatchSource::WhileDesugar;
// `true => <then>`:
let pats = hir_vec![self.pat_bool(span, true)];
(pats, cond, desugar, hir::LoopSource::While)
let pat = self.pat_bool(span, true);
(hir_vec![pat], cond, hir::MatchSource::WhileDesugar, hir::LoopSource::While)
}
};
let then_arm = self.arm(then_pats, P(then_expr));
let then_arm = self.arm(then_pat, P(then_expr));

// `match <scrutinee> { ... }`
let match_expr = self.expr_match(
Expand Down Expand Up @@ -440,7 +429,7 @@ impl LoweringContext<'_> {
hir::Arm {
hir_id: self.next_id(),
attrs: self.lower_attrs(&arm.attrs),
pats: arm.pats.iter().map(|x| self.lower_pat(x)).collect(),
pats: self.lower_pat_top_hack(&arm.pat),
guard: match arm.guard {
Some(ref x) => Some(hir::Guard::If(P(self.lower_expr(x)))),
_ => None,
Expand All @@ -450,6 +439,16 @@ impl LoweringContext<'_> {
}
}

/// HACK(or_patterns; Centril | dlrobertson): For now we don't push down top level or-patterns
/// `p | q` into `hir::PatKind::Or(...)` as post-lowering bits of the compiler are not ready
/// to deal with it. This should by fixed by pushing it down to HIR and then HAIR.
fn lower_pat_top_hack(&mut self, pat: &Pat) -> HirVec<P<hir::Pat>> {
match pat.node {
PatKind::Or(ref ps) => ps.iter().map(|x| self.lower_pat(x)).collect(),
_ => hir_vec![self.lower_pat(pat)],
}
}

pub(super) fn make_async_expr(
&mut self,
capture_clause: CaptureBy,
Expand Down Expand Up @@ -1255,7 +1254,6 @@ impl LoweringContext<'_> {
ThinVec::from(attrs.clone()),
));
let ok_pat = self.pat_ok(span, val_pat);

self.arm(hir_vec![ok_pat], val_expr)
};

Expand Down Expand Up @@ -1486,7 +1484,10 @@ impl LoweringContext<'_> {
}
}

fn arm(&mut self, pats: hir::HirVec<P<hir::Pat>>, expr: P<hir::Expr>) -> hir::Arm {
/// HACK(or_patterns; Centril | dlrobertson): For now we don't push down top level or-patterns
/// `p | q` into `hir::PatKind::Or(...)` as post-lowering bits of the compiler are not ready
/// to deal with it. This should by fixed by pushing it down to HIR and then HAIR.
fn arm(&mut self, pats: HirVec<P<hir::Pat>>, expr: P<hir::Expr>) -> hir::Arm {
hir::Arm {
hir_id: self.next_id(),
attrs: hir_vec![],
Expand Down
3 changes: 3 additions & 0 deletions src/librustc_asan/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ use build_helper::sanitizer_lib_boilerplate;
use cmake::Config;

fn main() {
if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) {
return;
}
if let Some(llvm_config) = env::var_os("LLVM_CONFIG") {
build_helper::restore_library_path();

Expand Down
6 changes: 6 additions & 0 deletions src/librustc_lexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@
authors = ["The Rust Project Developers"]
name = "rustc_lexer"
version = "0.1.0"
license = "MIT OR Apache-2.0"
edition = "2018"

repository = "https://github.com/rust-lang/rust/"
description = """
Rust lexer used by rustc. No stability guarantees are provided.
"""

# Note: do not remove this blank `[lib]` section.
# This will be used when publishing this crate as `rustc-ap-rustc_lexer`.
[lib]
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ impl EarlyLintPass for UnusedDocComment {
}

fn check_arm(&mut self, cx: &EarlyContext<'_>, arm: &ast::Arm) {
let arm_span = arm.pats[0].span.with_hi(arm.body.span.hi());
let arm_span = arm.pat.span.with_hi(arm.body.span.hi());
self.warn_if_doc(cx, arm_span, "match arms", false, &arm.attrs);
}

Expand Down
10 changes: 3 additions & 7 deletions src/librustc_lint/unused.rs
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,8 @@ impl EarlyLintPass for UnusedParens {
fn check_expr(&mut self, cx: &EarlyContext<'_>, e: &ast::Expr) {
use syntax::ast::ExprKind::*;
let (value, msg, followed_by_block, left_pos, right_pos) = match e.node {
Let(ref pats, ..) => {
for p in pats {
self.check_unused_parens_pat(cx, p, false, false);
}
Let(ref pat, ..) => {
self.check_unused_parens_pat(cx, pat, false, false);
return;
}

Expand Down Expand Up @@ -594,9 +592,7 @@ impl EarlyLintPass for UnusedParens {
}

fn check_arm(&mut self, cx: &EarlyContext<'_>, arm: &ast::Arm) {
for p in &arm.pats {
self.check_unused_parens_pat(cx, p, false, false);
}
self.check_unused_parens_pat(cx, &arm.pat, false, false);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/librustc_lsan/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ use build_helper::sanitizer_lib_boilerplate;
use cmake::Config;

fn main() {
if env::var("RUSTC_BUILD_SANITIZERS") != Ok("1".to_string()) {
return;
}
if let Some(llvm_config) = env::var_os("LLVM_CONFIG") {
build_helper::restore_library_path();

Expand Down
Loading