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

ChipDBs build flag for windows #521

Open
davidcorrigan714 opened this issue Nov 28, 2020 · 2 comments
Open

ChipDBs build flag for windows #521

davidcorrigan714 opened this issue Nov 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@davidcorrigan714
Copy link
Contributor

I'm working on getting nextpnr & prjtrellis compiled on windows and I've made good progress except something seems off about loading the chipdbs - namely that it seems to take an extra compiler flag to make it work properly on windows. Browsing through the code I see it's looking for the WIN32 flag, which seems to pick the right loading function if I add it to the compiler command line, but maybe it should be _WIN32 to pick up windows builds automatically?

@whitequark
Copy link
Member

The situation with WIN32 and _WIN32 is a bit complicated; in short, _WIN32 is always defined by a compiler targeting Windows, and WIN32 is defined somewhere else. That "somewhere else" is the project template in case of MSVC, and the system headers in case of MinGW.

Your conclusion is correct, common/embed.{cc,h} should use _WIN32 instead of WIN32.

@whitequark whitequark added the bug Something isn't working label Nov 28, 2020
@davidcorrigan714
Copy link
Contributor Author

I'll submit a PR for it in the next few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants