forked from Ms2ger/rust-mozjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinkhack.rs
27 lines (23 loc) · 822 Bytes
/
linkhack.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
// Some crumminess to make sure we link correctly
#[cfg(target_os = "linux")]
#[link(name = "pthread")]
#[link(name = "js_static")]
#[link(name = "stdc++")]
#[link(name = "z")]
extern { }
#[cfg(target_os = "macos")]
#[link(name = "js_static")]
#[link(name = "stdc++")]
#[link(name = "z")]
extern { }
//Avoid hard linking with stdc++ in android ndk cross toolchain
//It is hard to find location of android system libs in this rust source file
//and also we need to size down for mobile app packaging
#[cfg(target_os = "android")]
#[link(name = "js_static")]
#[link(name = "stdc++")]
#[link(name = "z")]
extern { }