Fix support of openmp for visual studio with clang toolset.#2023
Fix support of openmp for visual studio with clang toolset.#2023samsinsane merged 1 commit intopremake:masterfrom
Conversation
| if cfg.openmp == "On" then | ||
| table.insert(opts, 1, '-openmp') | ||
| end |
There was a problem hiding this comment.
Could this use the same as the above two lines and use the MSC toolset value? It looks like Clang is fine with /J, so it might be fine with /openmp and /openmp-? It looks like the "real" Clang flag is -fopenmp based on this.
Thoughts?
There was a problem hiding this comment.
Changed to '/openmp' which works too. (-fopenmp doesn't work IIRC, msvc translates option to clang).
There was a problem hiding this comment.
Sorry, what I meant is could this be written like the above lines which don't duplicate the flag but instead get it out of MSC? So, instead of:
table.insert(opts, 1, '/openmp')it would be:
table.insert(opts, 1, p.tools.msc.shared.openmp[cfg.openmp])I'm just not sure if it would accept /openmp- (from openmp "Off") as a valid flag?
There was a problem hiding this comment.
@Jarod42 to clarify, that's not me requesting this change but asking if you think it's worth it?
d3d7fb0 to
cbf4513
Compare
|
Tests actually fail as master fails. |
cbf4513 to
dba322b
Compare
What does this PR do?
Fix support of openmp for visual studio with clang toolset.
How does this PR change Premake's behavior?
only visual generator are impacted
Anything else we should know?
Also tested with my testing repo
especially action https://github.com/Jarod42/premake-sample-projects/actions/runs/3941604370
Did you check all the boxes?
closes #XXXXin comment to auto-close issue when PR is merged)