-
-
Notifications
You must be signed in to change notification settings - Fork 762
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
Improve vstudio #1904
Improve vstudio #1904
Conversation
was wrongly handling the case where a flag was present multiple times
…platesDiagnostics
it will remove duplicate flags. xmake/xmake/core/tool/builder.lua Line 358 in f3b1105
|
It doesn't because external headers are passed as a table, and thus concat. So it doesn't see "-external:W0" but "-external:W0-external:I..." |
The table is used to avoid internal deduplication, for example: avoid |
I understand what purpose it serves, but it will duplicate -external:W0, see this:
|
I know it will be repeated, but there is no better way, they can only be placed in a table. xmake/xmake/modules/core/tools/cl.lua Line 284 in 5c4adb1
|
Yes, but then it will break makefile and vstudio common flags search, because they will have a flag more than they have files, this is why I fixed it using a |
You can use this workaround solution to be compatible with it first |
Improve vstudio projects:
add_cxflags("/MP")
, which is VS default behavior) - can be disabled with flag /MP1Also during my tests I noticed that some flags may appear multiple times, and that the common flag check (which is also done in makefile project) failed because some flags appeared multiple times (like
-experimental:external
and such, which I suppose are added after xmake remove duplicates flags).Edit: I checked the reason why some duplicate flags are still there and it's because they were added as a parameter table, thus handled as a whole by _preprocess_flags