Use nproc and sysctl -n hw.cpu for default initializing CORES
This avoids having to pass --build-arg CORES=n when building the docker images.
This commit is contained in:
1 parent
e0f186967a
commit
99e2fefc9d
9 files changed
+13
-7
No files matched your search
+1
-3
@@ -22,8 +22,6 @@ ENV CROSS_TOOLCHAIN_PREFIX=/opt/llvm-mingw-$CROSS_ARCH
|
||||
ENV EXEEXT=.exe
|
||||
ENV HOST=$CROSS_ARCH-w64-mingw32
|
||||
|
||||
ARG CORES=4
|
||||
|
||||
COPY build-llvm.sh .
|
||||
RUN ./build-llvm.sh $CROSS_TOOLCHAIN_PREFIX
|
||||
COPY strip-llvm.sh .
|
||||
@@ -47,7 +45,7 @@ RUN wget -q https://ftp.gnu.org/gnu/binutils/binutils-2.31.1.tar.xz && \
|
||||
tar -Jxf binutils-2.31.1.tar.xz && \
|
||||
cd binutils-2.31.1 && \
|
||||
./configure --host=$HOST --target=x86_64-w64-mingw32 --prefix=/opt/binutils LDFLAGS="-Wl,-s" && \
|
||||
make -j$CORES && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cp /opt/binutils/x86_64-w64-mingw32/bin/objcopy.exe $CROSS_TOOLCHAIN_PREFIX/bin/binutils-objcopy.exe && \
|
||||
cp /opt/binutils/x86_64-w64-mingw32/bin/strip.exe $CROSS_TOOLCHAIN_PREFIX/bin/binutils-strip.exe
|
||||
|
||||
Reference in new issue
Block a user