Add aarch64-unknown-linux-gnu support

* Adding dependencies
* Replacing `i8` with `libc::c_char` to build properly on platforms
  where char is unsigned.
This commit is contained in:
Akos Kiss 2015-07-22 22:21:03 +00:00
parent e32068d17b
commit fa86ea4f6f
4 changed files with 14 additions and 5 deletions

View file

@ -73,6 +73,9 @@ git = "https://github.com/servo/rust-fontconfig"
[target.arm-unknown-linux-gnueabihf.dependencies.fontconfig] [target.arm-unknown-linux-gnueabihf.dependencies.fontconfig]
git = "https://github.com/servo/rust-fontconfig" git = "https://github.com/servo/rust-fontconfig"
[target.aarch64-unknown-linux-gnu.dependencies.fontconfig]
git = "https://github.com/servo/rust-fontconfig"
[target.arm-linux-androideabi.dependencies.fontconfig] [target.arm-linux-androideabi.dependencies.fontconfig]
git = "https://github.com/servo/rust-fontconfig" git = "https://github.com/servo/rust-fontconfig"
@ -85,6 +88,9 @@ git = "https://github.com/servo/rust-freetype"
[target.arm-unknown-linux-gnueabihf.dependencies.freetype] [target.arm-unknown-linux-gnueabihf.dependencies.freetype]
git = "https://github.com/servo/rust-freetype" git = "https://github.com/servo/rust-freetype"
[target.aarch64-unknown-linux-gnu.dependencies.freetype]
git = "https://github.com/servo/rust-freetype"
[target.arm-linux-androideabi.dependencies.freetype] [target.arm-linux-androideabi.dependencies.freetype]
git = "https://github.com/servo/rust-freetype" git = "https://github.com/servo/rust-freetype"

View file

@ -1491,7 +1491,7 @@ class MethodDefiner(PropertyDefiner):
' selfHostedName: %s\n' ' selfHostedName: %s\n'
' }', ' }',
' JSFunctionSpec {\n' ' JSFunctionSpec {\n'
' name: 0 as *const i8,\n' ' name: 0 as *const libc::c_char,\n'
' call: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo },\n' ' call: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo },\n'
' nargs: 0,\n' ' nargs: 0,\n'
' flags: 0,\n' ' flags: 0,\n'
@ -1565,7 +1565,7 @@ class AttrDefiner(PropertyDefiner):
' setter: %s\n' ' setter: %s\n'
' }', ' }',
' JSPropertySpec {\n' ' JSPropertySpec {\n'
' name: 0 as *const i8,\n' ' name: 0 as *const libc::c_char,\n'
' flags: 0,\n' ' flags: 0,\n'
' getter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo },\n' ' getter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo },\n'
' setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo }\n' ' setter: JSNativeWrapper { op: None, info: 0 as *const JSJitInfo }\n'
@ -3019,7 +3019,7 @@ class CGSpecializedForwardingSetter(CGSpecializedSetter):
assert all(ord(c) < 128 for c in forwardToAttrName) assert all(ord(c) < 128 for c in forwardToAttrName)
return CGGeneric("""\ return CGGeneric("""\
let mut v = RootedValue::new(cx, UndefinedValue()); let mut v = RootedValue::new(cx, UndefinedValue());
if JS_GetProperty(cx, obj, %s as *const u8 as *const i8, v.handle_mut()) == 0 { if JS_GetProperty(cx, obj, %s as *const u8 as *const libc::c_char, v.handle_mut()) == 0 {
return JSFalse; return JSFalse;
} }
if !v.ptr.is_object() { if !v.ptr.is_object() {
@ -3027,7 +3027,7 @@ if !v.ptr.is_object() {
return JSFalse; return JSFalse;
} }
let target_obj = RootedObject::new(cx, v.ptr.to_object()); let target_obj = RootedObject::new(cx, v.ptr.to_object());
JS_SetProperty(cx, target_obj.handle(), %s as *const u8 as *const i8, args.get(0)) JS_SetProperty(cx, target_obj.handle(), %s as *const u8 as *const libc::c_char, args.get(0))
""" % (str_to_const_array(attrName), attrName, str_to_const_array(forwardToAttrName))) """ % (str_to_const_array(attrName), attrName, str_to_const_array(forwardToAttrName)))

View file

@ -233,7 +233,7 @@ pub fn do_create_interface_objects(cx: *mut JSContext,
let constructor = RootedObject::new(cx, create_constructor(cx, cnative, cnargs, cs.as_ptr())); let constructor = RootedObject::new(cx, create_constructor(cx, cnative, cnargs, cs.as_ptr()));
assert!(!constructor.ptr.is_null()); assert!(!constructor.ptr.is_null());
unsafe { unsafe {
assert!(JS_DefineProperty1(cx, constructor.handle(), "prototype".as_ptr() as *const i8, assert!(JS_DefineProperty1(cx, constructor.handle(), "prototype".as_ptr() as *const libc::c_char,
rval.handle(), rval.handle(),
JSPROP_PERMANENT | JSPROP_READONLY, JSPROP_PERMANENT | JSPROP_READONLY,
None, None) != 0); None, None) != 0);

View file

@ -50,6 +50,9 @@ x11 = "1.1"
[target.arm-unknown-linux-gnueabihf.dependencies] [target.arm-unknown-linux-gnueabihf.dependencies]
x11 = "1.1" x11 = "1.1"
[target.aarch64-unknown-linux-gnu.dependencies]
x11 = "1.1"
[target.x86_64-apple-darwin.dependencies] [target.x86_64-apple-darwin.dependencies]
cgl = "0.1" cgl = "0.1"