Rust upgrade for android

This commit is contained in:
Lars Bergstrom 2014-03-16 18:04:42 -05:00
parent 412b0ef3f8
commit 6365b76597
9 changed files with 15 additions and 15 deletions

View file

@ -35,7 +35,7 @@ ifdef CFG_DISABLE_OPTIMIZE
$(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE)) $(info cfg: disabling rustc optimization (CFG_DISABLE_OPTIMIZE))
CFG_RUSTC_FLAGS += CFG_RUSTC_FLAGS +=
else else
CFG_RUSTC_FLAGS += -O -Z no-debug-borrows CFG_RUSTC_FLAGS += -O
endif endif
CFG_RUSTC_FLAGS += -g CFG_RUSTC_FLAGS += -g
@ -326,7 +326,7 @@ servo: $(DEPS_servo)
else else
servo: $(DEPS_servo) servo: $(DEPS_servo)
@$(call E, compile: $@) @$(call E, compile: $@)
$(Q)$(RUSTC) $(RFLAGS_servo) -Z gen-crate-map -o $@ $< --crate-type lib $(Q)$(RUSTC) $(RFLAGS_servo) -C gen-crate-map -o $@ $< --crate-type lib
endif endif
# Darwin app packaging # Darwin app packaging

2
configure vendored
View file

@ -385,7 +385,7 @@ case ${TARGET_OSTYPE} in
probe CFG_RANLIB arm-linux-androideabi-ranlib probe CFG_RANLIB arm-linux-androideabi-ranlib
export PATH=${OLD_PATH} export PATH=${OLD_PATH}
CFG_RUSTC_FLAGS="--target=${CFG_TARGET_TRIPLES} --android-cross-path=${CFG_ANDROID_CROSS_PATH}" CFG_RUSTC_FLAGS="--target=${CFG_TARGET_TRIPLES} -C android-cross-path=${CFG_ANDROID_CROSS_PATH}"
;; ;;
*) *)
CFG_PATH=$PATH CFG_PATH=$PATH

View file

@ -102,7 +102,7 @@ impl FontHandleMethods for FontHandle {
let mut face: FT_Face = ptr::null(); let mut face: FT_Face = ptr::null();
let face_index = 0 as FT_Long; let face_index = 0 as FT_Long;
let result = FT_New_Memory_Face(lib, cbuf, cbuflen as FT_Long, let result = FT_New_Memory_Face(lib, cbuf, cbuflen as FT_Long,
face_index, ptr::to_mut_unsafe_ptr(&mut face)); face_index, &mut face);
if !result.succeeded() || face.is_null() { if !result.succeeded() || face.is_null() {
return Err(()); return Err(());
@ -286,7 +286,7 @@ impl<'a> FontHandle {
let face_index = 0 as FT_Long; let face_index = 0 as FT_Long;
file.to_c_str().with_ref(|file_str| { file.to_c_str().with_ref(|file_str| {
FT_New_Face(ft_ctx, file_str, FT_New_Face(ft_ctx, file_str,
face_index, ptr::to_mut_unsafe_ptr(&mut face)); face_index, &mut face);
}); });
if face.is_null() { if face.is_null() {
return Err(()); return Err(());
@ -313,7 +313,7 @@ impl<'a> FontHandle {
let face_index = 0 as FT_Long; let face_index = 0 as FT_Long;
file.to_c_str().with_ref(|file_str| { file.to_c_str().with_ref(|file_str| {
FT_New_Face(ft_ctx, file_str, FT_New_Face(ft_ctx, file_str,
face_index, ptr::to_mut_unsafe_ptr(&mut face)); face_index, &mut face);
}); });
if face.is_null() { if face.is_null() {
return Err(()); return Err(());

View file

@ -14,7 +14,7 @@ use std::ptr;
use std::rc::Rc; use std::rc::Rc;
#[deriving(Clone)] #[deriving(Clone)]
struct FreeTypeLibraryHandle { pub struct FreeTypeLibraryHandle {
ctx: FT_Library, ctx: FT_Library,
} }

View file

@ -25,7 +25,7 @@ use font_list::{FontEntry, FontFamily, FontFamilyMap};
use platform::font::FontHandle; use platform::font::FontHandle;
use platform::font_context::FontContextHandle; use platform::font_context::FontContextHandle;
use std::hashmap::HashMap; use collections::hashmap::HashMap;
use std::libc; use std::libc;
use std::libc::{c_int, c_char}; use std::libc::{c_int, c_char};
use std::ptr; use std::ptr;
@ -68,7 +68,7 @@ impl FontListHandle {
unsafe { unsafe {
let config = FcConfigGetCurrent(); let config = FcConfigGetCurrent();
let font_set = FcConfigGetFonts(config, FcSetSystem); let font_set = FcConfigGetFonts(config, FcSetSystem);
let font_set_array_ptr = ptr::to_unsafe_ptr(&font_set); let font_set_array_ptr = &font_set;
let pattern = FcPatternCreate(); let pattern = FcPatternCreate();
assert!(pattern.is_not_null()); assert!(pattern.is_not_null());
"family".to_c_str().with_ref(|FC_FAMILY| { "family".to_c_str().with_ref(|FC_FAMILY| {

View file

@ -132,7 +132,7 @@ impl WindowMethods<Application> for Window {
} }
glut::mouse_func(~MouseCallbackState); glut::mouse_func(~MouseCallbackState);
let wrapped_window = Rc::from_send(window); let wrapped_window = Rc::new(window);
install_local_window(wrapped_window.clone()); install_local_window(wrapped_window.clone());
@ -151,11 +151,11 @@ impl WindowMethods<Application> for Window {
fn recv(&self) -> WindowEvent { fn recv(&self) -> WindowEvent {
if !self.event_queue.with_mut(|queue| queue.is_empty()) { if !self.event_queue.with_mut(|queue| queue.is_empty()) {
return self.event_queue.with_mut(|queue| queue.shift()) return self.event_queue.with_mut(|queue| queue.shift().unwrap())
} }
glut::check_loop(); glut::check_loop();
if !self.event_queue.with_mut(|queue| queue.is_empty()) { if !self.event_queue.with_mut(|queue| queue.is_empty()) {
self.event_queue.with_mut(|queue| queue.shift()) self.event_queue.with_mut(|queue| queue.shift().unwrap())
} else { } else {
IdleWindowEvent IdleWindowEvent
} }

@ -1 +1 @@
Subproject commit 0c0484e0c07a3e5ef3184f6182c96c354a06eebc Subproject commit ba3d7feda3962f427792c331ddad38ae417b5439

@ -1 +1 @@
Subproject commit 4481eff133bd63af85990844094486cb4abb5245 Subproject commit beb749916d07c16892cdc18f188bbc8fc2f22e76

@ -1 +1 @@
Subproject commit bc0e042ad80bf2cfee8d32e5dd2216616936d5ce Subproject commit 2388f74ffff633ba76f30472b010c06c26f0c187