From 1a35a1c688511bb09a67c1430d55e022ac5f88eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Thu, 23 May 2019 13:32:30 +0200 Subject: [PATCH] Ship profiler with windows-gnu --- appveyor.yml | 4 ++-- src/libprofiler_builtins/build.rs | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index dffd79c56e48a..7c5c779584109 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -104,7 +104,7 @@ environment: DEPLOY: 1 - CI_JOB_NAME: dist-i686-mingw MSYS_BITS: 32 - RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools + RUST_CONFIGURE_ARGS: --build=i686-pc-windows-gnu --enable-full-tools --enable-profiler SCRIPT: python x.py dist MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror MINGW_ARCHIVE: i686-6.3.0-release-posix-dwarf-rt_v5-rev2.7z @@ -114,7 +114,7 @@ environment: - CI_JOB_NAME: dist-x86_64-mingw MSYS_BITS: 64 SCRIPT: python x.py dist - RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools + RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-gnu --enable-full-tools --enable-profiler MINGW_URL: https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror MINGW_ARCHIVE: x86_64-6.3.0-release-posix-seh-rt_v5-rev2.7z MINGW_DIR: mingw64 diff --git a/src/libprofiler_builtins/build.rs b/src/libprofiler_builtins/build.rs index 491986480deba..0b2bda577d75f 100644 --- a/src/libprofiler_builtins/build.rs +++ b/src/libprofiler_builtins/build.rs @@ -41,7 +41,11 @@ fn main() { cfg.flag("-fomit-frame-pointer"); cfg.flag("-ffreestanding"); cfg.define("VISIBILITY_HIDDEN", None); - cfg.define("COMPILER_RT_HAS_UNAME", Some("1")); + if !target.contains("windows") { + cfg.define("COMPILER_RT_HAS_UNAME", Some("1")); + } else { + profile_sources.push("WindowsMMap.c"); + } } // Assume that the Unixes we are building this for have fnctl() available