add run-make test

This commit is contained in:
Jorge Aparicio 2018-09-13 20:25:58 +02:00
parent 39afcd0673
commit f5bc678255
2 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,12 @@
-include ../tools.mk
ifdef IS_WINDOWS
# Do nothing on MSVC.
all:
exit 0
else
# check that the .stack_sizes section is generated
all:
$(RUSTC) -C opt-level=3 -Z emit-stack-sizes --emit=obj foo.rs
size -A $(TMPDIR)/foo.o | $(CGREP) .stack_sizes
endif

View File

@ -0,0 +1,13 @@
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
#![crate_type = "lib"]
pub fn foo() {}