Skip to content

feat(C++ modules support) use a file for requires flags when --verbose or --diagnosis is supplied#6744

Merged
waruqi merged 3 commits intoxmake-io:devfrom
Arthapz:hide-dependency-flags2
Sep 9, 2025
Merged

feat(C++ modules support) use a file for requires flags when --verbose or --diagnosis is supplied#6744
waruqi merged 3 commits intoxmake-io:devfrom
Arthapz:hide-dependency-flags2

Conversation

@Arthapz
Copy link
Member

@Arthapz Arthapz commented Aug 25, 2025

this PR add a new policy build.c++.modules.hide_dependency (default to false) that enable passing requires flags as a file to reduce build log noise when compiling with -v (only impact msvc and clang as gcc already use a mapper file that do the same thing)
and make -D print the mapping like for gcc

before ---------
-v:
{7174ADBE-76EC-453D-8B99-7F6B88D9F1D1}

-D
{C376C195-4DE8-401E-936A-9D5894A84237}

-vD:
{856C06DC-C87E-429F-B443-238F7340DBE4}

after ---------
-v:
{D81D94C5-6E18-4F62-B4FD-02C7EF1E4228}

-D
{0823A46A-FFD7-4400-AA20-4B6DB92B5A2D}

-vD:
{89A60786-6361-48F0-AB9F-B2198AC6808A}

@Arthapz Arthapz changed the title feat(C++ modules support) use a file for requires files when --verbose or --diagnosis is supplied feat(C++ modules support) use a file for requires flags when --verbose or --diagnosis is supplied Aug 25, 2025
@waruqi
Copy link
Member

waruqi commented Sep 2, 2025

Does it ready now?

@Arthapz Arthapz marked this pull request as ready for review September 8, 2025 14:06
@Arthapz
Copy link
Member Author

Arthapz commented Sep 8, 2025

it is, i was justs waiting for @MacroModel to know if it's what he want

@waruqi waruqi added this to the v3.0.3 milestone Sep 9, 2025
for _, flag in ipairs(requiresflags) do
-- we need to wrap flag to support flag with space
if type(flag) == "string" and flag:find(" ", 1, true) and not hide_dependencies then
table.insert(cxxflags, {flag})
Copy link
Member

Choose a reason for hiding this comment

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

incorrect indent


import foo;

int main() {
Copy link
Member

Choose a reason for hiding this comment

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

int main(int argc, char** argv) {
}

@waruqi waruqi merged commit e115e55 into xmake-io:dev Sep 9, 2025
22 checks passed
@Arthapz Arthapz deleted the hide-dependency-flags2 branch September 18, 2025 09:23
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