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

Precompile windows gcc 8 #1039

Merged
merged 3 commits into from Sep 17, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Expand Up @@ -32,6 +32,7 @@ jobs:
shell: powershell
- name: Build Math libs & add to PATH
run: |
make print-PRECOMPILED_HEADERS
Copy link
Member Author

Choose a reason for hiding this comment

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

This is just a test that shows that its still disabled in the Github Action test with Rtools 3.5.

mingw32-make -f stan/lib/stan_math/make/standalone math-libs
echo "D:/a/cmdstan/cmdstan/stan/lib/stan_math/lib/tbb" | Out-File -Append -FilePath $env:GITHUB_PATH -Encoding utf8
shell: powershell
Expand Down
4 changes: 4 additions & 0 deletions makefile
Expand Up @@ -108,7 +108,11 @@ endif
STAN_FLAGS=$(STAN_FLAG_THREADS)$(STAN_FLAG_MPI)$(STAN_FLAG_OPENCL)

ifeq ($(OS),Windows_NT)
ifeq ($(shell expr $(CXX_MAJOR) \>= 8), 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also be checking they are using gcc and not clang or would it be fine in that case as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

Clang on windows with cmdstan does not work at all (#736) so that didnt cross my mind. Will add a note there if we ever figure that out.

Other option would be to keep the precompiled headers off in the off chance someone tries this with clang on Windows?

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed the logic to also handle clang on Windows. As we have no idea if it works, I opted to disabling it by default.

PRECOMPILED_HEADERS ?= true
else
PRECOMPILED_HEADERS ?= false
endif
else
PRECOMPILED_HEADERS ?= true
endif
Expand Down