1
Fork 0

Use attributes for native module ABI and link name

This patch changes how to specify ABI and link name of a native module.

Before:
  native "cdecl" mod llvm = "rustllvm" {...}

After:
  #[abi = "cdecl"]
  #[link_name = "rustllvm"]
  native mod llvm {...}

The old optional syntax for ABI and link name is no longer supported.

Fixes issue #547
This commit is contained in:
Haitao Li 2011-11-16 22:49:38 -06:00 committed by Brian Anderson
parent 7a9b66db63
commit 88f29aab27
46 changed files with 168 additions and 128 deletions

View file

@ -110,7 +110,9 @@ const LLVMRealULE: uint = 13u;
const LLVMRealUNE: uint = 14u;
#[link_args = "-Lrustllvm"]
native "cdecl" mod llvm = "rustllvm" {
#[link_name = "rustllvm"]
#[abi = "cdecl"]
native mod llvm {
type ModuleRef;
type ContextRef;