diff --git a/src/test/run-make-fulldeps/emit-stack-sizes/Makefile b/src/test/run-make-fulldeps/emit-stack-sizes/Makefile new file mode 100644 index 00000000000..b6b8113633d --- /dev/null +++ b/src/test/run-make-fulldeps/emit-stack-sizes/Makefile @@ -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 diff --git a/src/test/run-make-fulldeps/emit-stack-sizes/foo.rs b/src/test/run-make-fulldeps/emit-stack-sizes/foo.rs new file mode 100644 index 00000000000..6c81b63963a --- /dev/null +++ b/src/test/run-make-fulldeps/emit-stack-sizes/foo.rs @@ -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 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "lib"] + +pub fn foo() {}