Skip to content

Commit

Permalink
remove c++ compiler settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Sy0307 committed Mar 2, 2025
1 parent 53b2df3 commit e87cdb8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,25 @@ COPY . .
# 更新子模块
RUN git submodule update --init --recursive

# 设置环境变量
ENV CXX=g++
ENV CC=gcc
# 设置环境变量 (移除 CXX 和 CC,保留 LLVM_DIR 和 PATH)
ENV LLVM_DIR=/usr/lib/llvm-17/lib/cmake/llvm
ENV PATH="${PATH}:/usr/lib/llvm-17/bin"

# 使用您提供的cmake配置进行构建
RUN cmake -Bbuild \
RUN rm -rf build && mkdir build && cmake -Bbuild \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_BPFTIME_DAEMON=1 \
-DCMAKE_C_COMPILER=/usr/lib/llvm-17/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/lib/llvm-17/bin/clang++ \
-DLLVM_CONFIG=/usr/lib/llvm-17/bin/llvm-config \
-DLLVM_DIR=/usr/lib/llvm-17/lib/cmake/llvm

# 调试信息: 列出目录内容
RUN echo "Listing /usr/lib/llvm-17/include/llvm/Transforms/IPO/:"; ls -l /usr/lib/llvm-17/include/llvm/Transforms/IPO/
RUN echo "Listing /usr/lib/llvm-17/bin/:"; ls -l /usr/lib/llvm-17/bin/
RUN echo "Listing /usr/lib/llvm-17/lib/cmake/llvm/:"; ls -l /usr/lib/llvm-17/lib/cmake/llvm/


# 编译
RUN cd build && make -j$(nproc)

Expand Down

0 comments on commit e87cdb8

Please sign in to comment.