Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clang instructions for building Win64 julia #17223

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,24 @@ or edit `%USERPROFILE%\.gitconfig` and add/edit the lines:
3. Specify the location where you installed CMake

```
echo 'override CMAKE=/C/path/to/CMake/bin/cmake.exe' > Make.user
echo 'override CMAKE="/C/Program Files/CMake/bin/cmake.exe"' >> Make.user
```
*N.B.* The path to CMAKE may differ on your system. Adjust accordingly.

4. Optionally install clang as your C/C++ compiler
1. Download and install the prebuilt clang binaries from http://llvm.org/releases/download.html.
The rest of these instructions will assume LLVM was installed to C:\LLVM.
2. Set clang as your default compiler:
```
cat > Make.user <<EOF
override CC_ARG=--sysroot=$(HOME)/julia/usr/x86_64-w64-mingw32/sys-root/mingw -target x86_64-w64-mingw32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't assume $(HOME)/julia

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also separate instructions for 32 vs 64 bit build

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bullet 1 assumes $(HOME)/julia, if people adjust this, that's their own business.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only implicitly, if you assume people clone from home. should be more generalizable via pwd

override CXX_ARG=$(CC_ARG)
override CC=/C/LLVM/bin/clang.exe $(CC_ARG)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why does there need to be a separate variable for args?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMAKE needs CC_BASE and CC_ARG separately. We set CC_BASE automatically based on CC, but the same does not appear to be true for CC_ARG.

override CXX=/C/LLVM/bin/clang++.exe $(CC_ARG)
EOF
```

4. Start the build
5. Start the build
```
make -j 4 # Adjust the number of cores (4) to match your build environment.
```
Expand Down