about summary refs log tree commit diff
path: root/src/ci
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-10-20 19:15:06 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-11-02 06:52:56 -0700
commit016eaf88f5bca6c9253eedec713c6ddcd6da2906 (patch)
treebb32f508b08930114bd8f3377e11d2fcb6a7cb70 /src/ci
parent61e89446ef6e115630faa75c985c599d739f7586 (diff)
downloadrust-016eaf88f5bca6c9253eedec713c6ddcd6da2906.tar.gz
rust-016eaf88f5bca6c9253eedec713c6ddcd6da2906.zip
Use `jemalloc-sys` on Linux and OSX compilers
This commit adds opt-in support to the compiler to link to `jemalloc` in
the compiler. When activated the compiler will depend on `jemalloc-sys`,
instruct jemalloc to unprefix its symbols, and then link to it. The
feature is activated by default on Linux/OSX compilers for x86_64/i686
platforms, and it's not enabled anywhere else for now. We may be able to
opt-in other platforms in the future! Also note that the opt-in only
happens on CI, it's otherwise unconditionally turned off by default.

Closes #36963
Diffstat (limited to 'src/ci')
-rw-r--r--src/ci/docker/dist-i686-linux/Dockerfile3
-rw-r--r--src/ci/docker/dist-x86_64-linux/Dockerfile3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/ci/docker/dist-i686-linux/Dockerfile b/src/ci/docker/dist-i686-linux/Dockerfile
index d99e409e426..8df49f364a3 100644
--- a/src/ci/docker/dist-i686-linux/Dockerfile
+++ b/src/ci/docker/dist-i686-linux/Dockerfile
@@ -98,7 +98,8 @@ ENV RUST_CONFIGURE_ARGS \
       --enable-sanitizers \
       --enable-profiler \
       --set target.i686-unknown-linux-gnu.linker=clang \
-      --build=i686-unknown-linux-gnu
+      --build=i686-unknown-linux-gnu \
+      --set rust.jemalloc
 ENV SCRIPT python2.7 ../x.py dist --build $HOSTS --host $HOSTS --target $HOSTS
 ENV CARGO_TARGET_I686_UNKNOWN_LINUX_GNU_LINKER=clang
 
diff --git a/src/ci/docker/dist-x86_64-linux/Dockerfile b/src/ci/docker/dist-x86_64-linux/Dockerfile
index 8696f72e0e3..0a2dae72f73 100644
--- a/src/ci/docker/dist-x86_64-linux/Dockerfile
+++ b/src/ci/docker/dist-x86_64-linux/Dockerfile
@@ -101,7 +101,8 @@ ENV RUST_CONFIGURE_ARGS \
       --set target.x86_64-unknown-linux-gnu.linker=clang \
       --set target.x86_64-unknown-linux-gnu.ar=/rustroot/bin/llvm-ar \
       --set target.x86_64-unknown-linux-gnu.ranlib=/rustroot/bin/llvm-ranlib \
-      --set llvm.thin-lto=true
+      --set llvm.thin-lto=true \
+      --set rust.jemalloc
 ENV SCRIPT python2.7 ../x.py dist --host $HOSTS --target $HOSTS
 ENV CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang