Skip to content

Commit

Permalink
Auto merge of #9863 - larsbergstrom:appveyor2, r=edunham
Browse files Browse the repository at this point in the history
Fix Windows build and add AppVeyor support

Proof of success: https://ci.appveyor.com/project/larsbergstrom/servo/build/1.0.15

Fixes #9767

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9863)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Mar 4, 2016
2 parents 1c63bf9 + 5d24f7c commit 08b9fe0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
33 changes: 33 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
version: 1.0.{build}

branches:
only:
- master

platform:
- x64

cache:
- .servo
- .cargo

install:
- set MSYSTEM=MSYS
- set MSYS="winsymlinks=lnk"
- PATH C:\msys64\mingw64\bin;C:\msys64\usr\bin\;%PATH%
- bash -lc "echo $MSYSTEM; pacman --needed --noconfirm -Sy pacman-mirrors"
- bash -lc "pacman --noconfirm -Sy"
- bash -lc "pacman -Sy --needed --noconfirm git mingw-w64-x86_64-toolchain mingw-w64-x86_64-freetype mingw-w64-x86_64-icu mingw-w64-x86_64-nspr mingw-w64-x86_64-ca-certificates mingw-w64-x86_64-expat mingw-w64-x86_64-cmake tar diffutils patch patchutils make python2-setuptools"
- bash -lc "easy_install-2.7 pip virtualenv"
- bash -lc "mv /mingw64/bin/python2.exe /mingw64/bin/python2-mingw64.exe"
- bash -lc "mv /mingw64/bin/python2.7.exe /mingw64/bin/python2.7-mingw64.exe"

build_script:
- cmd: >-
set MSYSTEM=MINGW64
PATH C:\msys64\mingw64\bin;C:\msys64\usr\bin\;%PATH%
bash -lc "cd $APPVEYOR_BUILD_FOLDER; ./mach build -d -v"
test: off
1 change: 1 addition & 0 deletions components/profile/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#![feature(plugin)]
#![plugin(plugins)]

#[cfg(not(target_os = "windows"))]
extern crate alloc_jemalloc;
extern crate hbs_pow;
extern crate ipc_channel;
Expand Down
6 changes: 6 additions & 0 deletions components/profile/mem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ mod system_reporter {
newp: *mut c_void, newlen: size_t) -> c_int;
}

#[cfg(not(target_os = "windows"))]
fn jemalloc_stat(value_name: &str) -> Option<usize> {
// Before we request the measurement of interest, we first send an "epoch"
// request. Without that jemalloc gives cached statistics(!) which can be
Expand Down Expand Up @@ -498,6 +499,11 @@ mod system_reporter {
Some(value as usize)
}

#[cfg(target_os = "windows")]
fn jemalloc_stat(value_name: &str) -> Option<usize> {
None
}

// Like std::macros::try!, but for Option<>.
macro_rules! option_try(
($e:expr) => (match $e { Some(e) => e, None => return None })
Expand Down

0 comments on commit 08b9fe0

Please sign in to comment.