about summary refs log tree commit diff
path: root/src/libsyntax_ext/lib.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2017-04-14 17:41:03 -0400
committerGitHub <noreply@github.com>2017-04-14 17:41:03 -0400
commite6f6b445aa2fc71f626dff7f7c7988b04f4a292d (patch)
tree7ecc980b1e110fbf55b96cf7ac88825d77244f54 /src/libsyntax_ext/lib.rs
parentba377982a3fde98a3cac02493c16dc623b02a421 (diff)
parenta35c4e354a65fdbbb61741db3a9dd1c190f2f146 (diff)
downloadrust-e6f6b445aa2fc71f626dff7f7c7988b04f4a292d.tar.gz
rust-e6f6b445aa2fc71f626dff7f7c7988b04f4a292d.zip
Rollup merge of #40702 - mrhota:global_asm, r=nagisa
Implement global_asm!() (RFC 1548)

This is a first attempt. ~~One (potential) problem I haven't solved is how to handle multiple usages of `global_asm!` in a module/crate. It looks like `LLVMSetModuleInlineAsm` overwrites module asm, and `LLVMAppendModuleInlineAsm` is not provided in LLVM C headers 😦~~

I can provide more detail as needed, but honestly, there's not a lot going on here.

r? @eddyb

CC @Amanieu @jackpot51

Tracking issue: #35119
Diffstat (limited to 'src/libsyntax_ext/lib.rs')
-rw-r--r--src/libsyntax_ext/lib.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libsyntax_ext/lib.rs b/src/libsyntax_ext/lib.rs
index 1e9b112b6df..e35e79df585 100644
--- a/src/libsyntax_ext/lib.rs
+++ b/src/libsyntax_ext/lib.rs
@@ -38,6 +38,7 @@ mod concat_idents;
 mod env;
 mod format;
 mod format_foreign;
+mod global_asm;
 mod log_syntax;
 mod trace_macros;
 
@@ -99,6 +100,7 @@ pub fn register_builtins(resolver: &mut syntax::ext::base::Resolver,
         module_path: expand_mod,
 
         asm: asm::expand_asm,
+        global_asm: global_asm::expand_global_asm,
         cfg: cfg::expand_cfg,
         concat: concat::expand_syntax_ext,
         concat_idents: concat_idents::expand_syntax_ext,