Skip to content

Commit

Permalink
Add cross compile for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardo010174 committed Dec 21, 2023
1 parent 1059368 commit 251a765
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,10 @@ RUN cp config.example.toml config.toml &&\
sed -i 's/#channel = "dev"/channel = "nightly"/' config.toml &&\
sed -i 's/#llvm-config = <none> (path)/llvm-config = "\/repos\/llvm-16.0-2023-03-06\/build\/bin\/llvm-config"/' config.toml &&\
sed -i 's/#llvm-filecheck = "\/path\/to\/llvm-version\/bin\/FileCheck"/llvm-filecheck = "\/repos\/llvm-16.0-2023-03-06\/build\/bin\/FileCheck"/' config.toml &&\
sed -i 's/#target = build.host (list of triples)/target = ["x86_64-unknown-linux-gnu"]/' config.toml
# sed -i 's/#target = build.host (list of triples)/target = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]/' config.toml
sed -i 's/#target = build.host (list of triples)/target = ["x86_64-unknown-linux-gnu", "x86_64-pc-windows-gnu"]/' config.toml

# build rust compiler
#RUN python3 x.py build --target x86_64-unknown-linux-gnu,x86_64-pc-windows-gnu
RUN python3 x.py build --target x86_64-unknown-linux-gnu
RUN python3 x.py build --target x86_64-unknown-linux-gnu,x86_64-pc-windows-gnu

# build cargo
#RUN python3 x.py build tools/cargo
Expand All @@ -119,7 +117,6 @@ RUN bash rustup.sh
RUN rustup toolchain list --verbose

# rustup link our custom OLLVM toolchain, make it default
# RUN rustup toolchain link ollvm-rust-1.70.0 /repos/rust-1.70.0/build/x86_64-pc-windows-gnu/stage1/
RUN rustup toolchain link ollvm-rust-1.70.0 /repos/rust-1.70.0/build/x86_64-unknown-linux-gnu/stage1/ &&\
rustup default ollvm-rust-1.70.0

Expand Down

0 comments on commit 251a765

Please sign in to comment.