mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 16:54:01 +00:00
Auto merge of #27330 - alexcrichton:reenable-lto-syntax-extension, r=huonw
The functionality this was testing was removed somewhere along the line, and this commit restores what it was testing. Closes #20586
This commit is contained in:
commit
ec49d01c88
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||||
// file at the top-level directory of this distribution and at
|
// file at the top-level directory of this distribution and at
|
||||||
// http://rust-lang.org/COPYRIGHT.
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
//
|
//
|
||||||
@ -8,4 +8,8 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
// no-prefer-dynamic
|
||||||
|
|
||||||
#![crate_type = "rlib"]
|
#![crate_type = "rlib"]
|
||||||
|
|
||||||
|
pub fn foo() {}
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
|
||||||
// file at the top-level directory of this distribution and at
|
// file at the top-level directory of this distribution and at
|
||||||
// http://rust-lang.org/COPYRIGHT.
|
// http://rust-lang.org/COPYRIGHT.
|
||||||
//
|
//
|
||||||
@ -8,9 +8,14 @@
|
|||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
|
// force-host
|
||||||
|
|
||||||
|
#![feature(plugin_registrar)]
|
||||||
#![feature(rustc_private)]
|
#![feature(rustc_private)]
|
||||||
|
|
||||||
extern crate lib;
|
extern crate rustc;
|
||||||
#[macro_use] extern crate log;
|
|
||||||
|
|
||||||
fn main() {}
|
use rustc::plugin::Registry;
|
||||||
|
|
||||||
|
#[plugin_registrar]
|
||||||
|
pub fn plugin_registrar(_reg: &mut Registry) {}
|
@ -1,18 +0,0 @@
|
|||||||
-include ../tools.mk
|
|
||||||
|
|
||||||
# This test attempts to use syntax extensions, which are known to be
|
|
||||||
# incompatible with stage1 at the moment.
|
|
||||||
|
|
||||||
ifeq ($(RUST_BUILD_STAGE),1)
|
|
||||||
DOTEST=
|
|
||||||
else
|
|
||||||
DOTEST=dotest
|
|
||||||
endif
|
|
||||||
|
|
||||||
all: $(DOTEST)
|
|
||||||
|
|
||||||
dotest:
|
|
||||||
env
|
|
||||||
$(RUSTC) lib.rs
|
|
||||||
$(RUSTC) main.rs -C lto
|
|
||||||
$(call RUN,main)
|
|
24
src/test/run-pass-fulldeps/lto-syntax-extension.rs
Normal file
24
src/test/run-pass-fulldeps/lto-syntax-extension.rs
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
// Copyright 2015 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.
|
||||||
|
|
||||||
|
// aux-build:lto-syntax-extension-lib.rs
|
||||||
|
// aux-build:lto-syntax-extension-plugin.rs
|
||||||
|
// compile-flags:-C lto
|
||||||
|
// ignore-stage1
|
||||||
|
// no-prefer-dynamic
|
||||||
|
|
||||||
|
#![feature(plugin)]
|
||||||
|
#![plugin(lto_syntax_extension_plugin)]
|
||||||
|
|
||||||
|
extern crate lto_syntax_extension_lib;
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
lto_syntax_extension_lib::foo();
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user