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

Fix incompatible MSVC options being passed through to nvcc #383

Merged
merged 2 commits into from
Dec 15, 2023

Conversation

matthewdcong
Copy link
Contributor

nanobind adds /bigobj and /MP as compiler options for MSVC which results in this issue previously seen in pybind11.

pybind/pybind11#3883

The same fix has been ported over in this PR.

@wjakob
Copy link
Owner

wjakob commented Dec 14, 2023

Should something similar be done related to size optimizations? I remember vaguely that nvcc doesn't like -Os

@matthewdcong
Copy link
Contributor Author

The current workaround for that is passing NOMINSIZE to nanobind_add_module. However, that applies to the whole module as opposed to individual translation units so it really depends if we want the finer grained control.

@wjakob
Copy link
Owner

wjakob commented Dec 14, 2023

Could you modify the patch so that the default (pass -Os unless NOMINSIZE is specified) is handled differently so that nvcc works out of the box? Then this PR would be complete in the sense that it handles all nvcc-related oddities.

@matthewdcong
Copy link
Contributor Author

matthewdcong commented Dec 14, 2023

Sure, sounds good.

Done

@wjakob
Copy link
Owner

wjakob commented Dec 15, 2023

Thanks!

@wjakob wjakob merged commit a307eac into wjakob:master Dec 15, 2023
@matthewdcong matthewdcong deleted the msvc_nvcc_compat_fix branch January 4, 2024 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants