diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-09-08 00:40:00 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-09-08 00:40:00 -0500 |
commit | bbd6b2c9919e02642a8874e5ceb2ba3b5c76adec (patch) | |
tree | 2b37b60bce998847536199a8e23aafdee3de04f7 /src/parser.rs | |
parent | 89e272581dae736c0751aecef29593ab21340ae6 (diff) | |
parent | 120dacb84e7db568560e381aeec931aa13c680f8 (diff) |
Auto merge of #54 - vvuk:master, r=emilio
Skip -isystem stuff if --target is specified, and don't strip leading _ on Windows
The -isystem stuff fixes issue #53.
Stripping leading _ on Windows is weird; it needs to not be stripped on MSVC (leading @), but on gcc at one point it needed to be. But now it no longer does. I don't know. 'cargo test' succeeds with mozjs bindings generated with these fixes.
Diffstat (limited to 'src/parser.rs')
-rw-r--r-- | src/parser.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/parser.rs b/src/parser.rs index d8227f3a..0e531420 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -68,13 +68,10 @@ impl<'a> ClangParserCtx<'a> { } } -fn cursor_link_name(ctx: &mut ClangParserCtx, cursor: &Cursor) -> String { - let mut mangling = cursor.mangling(); - +fn cursor_link_name(_: &mut ClangParserCtx, cursor: &Cursor) -> String { // Try to undo backend linkage munging (prepended _, generally) - if cfg!(target_os = "macos") || - (cfg!(target_os = "windows") && !ctx.options.msvc_mangling) - { + let mut mangling = cursor.mangling(); + if cfg!(target_os = "macos") { mangling.remove(0); } mangling |