Skip to content

Commit

Permalink
Do not use clang on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
camearle20 committed Feb 17, 2024
1 parent afdc715 commit f0d04ab
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions trajectory_native/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ grpc:
RUN git clone --recurse-submodules -b v1.60.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
RUN mkdir grpc/build
WORKDIR grpc/build
ENV CC=clang
ENV CXX=clang++
IF [ "$TARGETARCH" = "arm64" ]
ENV CC=clang
ENV CXX=clang++
END
RUN cmake -DgRPC_INSTALL=ON -DgRPC_BUILD_TESTS=OFF ..
RUN make -j4
RUN make DESTDIR=$(pwd)/installroot_top install
Expand All @@ -27,11 +29,13 @@ trajoptlib:
GIT CLONE --branch 95c20be79be7557673d75d631703dc92fe6a191e https://github.com/SleipnirGroup/TrajoptLib TrajoptLib
WORKDIR TrajoptLib
COPY trajoptlib-aarch64.patch .
RUN git apply trajoptlib-aarch64.patch
RUN git apply --ignore-space-change --ignore-whitespace trajoptlib-aarch64.patch
RUN mkdir build
WORKDIR build
ENV CC=clang
ENV CXX=clang++
IF [ "$TARGETARCH" = "arm64" ]
ENV CC=clang
ENV CXX=clang++
END
RUN cmake -DOPTIMIZER_BACKEND=casadi -DBUILD_TESTING=OFF ..
RUN make -j4
RUN make DESTDIR=$(pwd)/installroot_top install
Expand All @@ -45,8 +49,10 @@ dev-image:
BUILD +trajoptlib
COPY +grpc/installroot /usr/local/
COPY +trajoptlib/installroot /usr/local/
ENV CC=clang
ENV CXX=clang++
IF [ "$TARGETARCH" = "arm64" ]
ENV CC=clang
ENV CXX=clang++
END
SAVE IMAGE littletonrobotics/vts-dev

vts:
Expand All @@ -56,6 +62,10 @@ vts:
COPY CMakeLists.txt CMakeLists.txt
RUN mkdir build
WORKDIR build
IF [ "$TARGETARCH" = "arm64" ]
ENV CC=clang
ENV CXX=clang++
END
RUN cmake ..
RUN make -j4
EXPOSE 56328
Expand Down

0 comments on commit f0d04ab

Please sign in to comment.