Skip to content

Commit 7c0bd75

Browse files
committed
[lumen] build script/dockerfile updates
1 parent 9562b1d commit 7c0bd75

File tree

3 files changed

+9
-21
lines changed

3 files changed

+9
-21
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,12 @@ dist-linux: ## Build an LLVM release distribution for x86_64-unknown-linux
8888
docker build \
8989
-t llvm-project:dist-$(RELEASE)-$(SHA) \
9090
--target=dist \
91-
--build-arg buildscript_args="-release=$(RELEASE) -flavor=RelWithDebInfo -clean-obj" . && \
91+
--build-arg buildscript_args="-release=$(RELEASE) -with-dylib -link-dylib -flavor=RelWithDebInfo -clean-obj -j=2" . && \
9292
utils/dist/extract-release.sh -release $(RELEASE) -sha $(SHA)
9393

9494
docker: ## Build a Docker image containing an LLVM distribution
9595
cd lumen/ && \
9696
docker build \
9797
-t lumen/llvm:latest \
9898
--target=release \
99-
--build-arg buildscript_args="-release=$(RELEASE) -flavor=RelWithDebInfo -clean-obj" .
99+
--build-arg buildscript_args="-release=$(RELEASE) -with-dylib -link-dylib -flavor=RelWithDebInfo -clean-obj -j=2" .

lumen/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ RUN apt-get update && \
2626
libxml2-dev \
2727
libncurses5-dev \
2828
python2.7-dev \
29+
python3 \
30+
python3-dev \
2931
file \
3032
python \
3133
wget \

lumen/utils/dist/build-dist.sh

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,14 @@ install_toolchain_only="OFF"
4747
c_compiler="$CC"
4848
cxx_compiler="$CXX"
4949

50-
llvm_tools=";llvm-objcopy" # used to transform ELFs into binary format which flashing tools consume
51-
llvm_tools=";llvm-objdump" # used to disassemble programs
52-
llvm_tools=";llvm-profdata" # used to inspect and merge files generated by profiles
53-
llvm_tools=";llvm-readobj" # used to get information from ELFs/objects that the other tools don't provide
54-
llvm_tools=";llvm-size" # used to prints the size of the linker sections of a program
55-
llvm_tools=";llvm-strip" # used to discard symbols from binary files to reduce their size
56-
llvm_tools=";llvm-ar" # used for creating and modifying archive files
57-
llvm_tools=";llvm-config" # used for build configuration
58-
llvm_tools=";llvm-tblgen" # used for tablegen
59-
llvm_tools=";mlir-tblgen" # used for tablegen
60-
6150
llvm_dylib_components="all"
6251

6352
enable_runtimes="compiler-rt;libcxx;libcxxabi;libunwind"
64-
# Disable lldb on macOS by default
65-
if [ "$(uname -s)" = "Darwin" ]; then
66-
enable_projects="clang;clang-tools-extra;lld;llvm;mlir"
67-
else
68-
enable_projects="clang;clang-tools-extra;lld;lldb;llvm;mlir"
53+
enable_projects="llvm;mlir;lld;clang;lldb"
54+
55+
# Disable lldb on macOS
56+
if [[ "$enable_projects" =~ "lldb" ]] && [ "$(uname -s)" = "Darwin" ]; then
57+
enable_projects="llvm;mlir;lld;clang"
6958
fi
7059

7160
num_jobs=""
@@ -407,9 +396,6 @@ function configure_core() {
407396
if [[ ! "$triple" =~ apple ]]; then
408397
extra_configure_flags="-DLLVM_ENABLE_LLD=ON $extra_configure_flags"
409398
fi
410-
if [[ ! "$triple" =~ "apple-darwin" ]] && [[ ! "$triple" =~ "linux-gnu" ]]; then
411-
extra_configure_flags="-DLLVM_LINK_LLVM_DYLIB=OFF $extra_configure_flags"
412-
fi
413399
if [ -n "$enable_static_libcpp" ]; then
414400
if [[ "$triple" =~ "apple" ]]; then
415401
extra_configure_flags="-DCMAKE_EXE_LINKER_FLAGS=\"-static-libstdc++\" $extra_configure_flags"

0 commit comments

Comments
 (0)