Page MenuHomePhabricator

[Driver] move NetBSD header search path management to the driver

Authored by brad on Jan 1 2023, 3:48 AM.

Diff Detail

Unit TestsFailed

4,210 msx64 debian > Clang.Driver::netbsd.cpp
Script: -- : 'RUN: at line 1'; /var/lib/buildkite-agent/builds/llvm-project/build/bin/clang --driver-mode=g++ --target=x86_64-unknown-netbsd -stdlib=platform --sysroot=/var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/Inputs/basic_netbsd_tree -### /var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/netbsd.cpp 2>&1 | /var/lib/buildkite-agent/builds/llvm-project/build/bin/FileCheck -check-prefix=X86_64 /var/lib/buildkite-agent/builds/llvm-project/clang/test/Driver/netbsd.cpp

Event Timeline

brad created this revision.Jan 1 2023, 3:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 1 2023, 3:48 AM
brad requested review of this revision.Jan 1 2023, 3:48 AM
brad edited the summary of this revision. (Show Details)
MaskRay accepted this revision.Jan 2 2023, 9:49 PM


This revision is now accepted and ready to land.Jan 2 2023, 9:49 PM
brad updated this revision to Diff 486505.Jan 5 2023, 2:31 AM

Tweak test.

This revision was landed with ongoing or failed builds.Jan 5 2023, 3:14 AM
This revision was automatically updated to reflect the committed changes.

Hi @brad ,

would you fix the tests

looks like the problem is here:

// DRIVER-PASS-INCLUDES:      "-internal-externc-isystem" "/usr/include"

could be another path instead of "/usr/include".

this one should work for the most cases

// DRIVER-PASS-INCLUDES:      "-internal-externc-isystem" "{{.*}}/usr/include"

Hi @brad,
thank you for fixing the broken tests.

There is still a problem with netbsd.c test:

// DRIVER-PASS-INCLUDES-SAME: {{^}} "-internal-isystem" "[[RESOURCE]]{{/|\\\\}}include"
// DRIVER-PASS-INCLUDES-SAME: {{^}} "-internal-externc-isystem" "{{.*}}/usr/include"

The first's {{^}} breaks the test. It can be removed from the first line or from the both of them.
The tests are getting passed without this part on the win-x-cross builders. They should work on Linux/BSD hosts with these changes.
Would you check and update the tests accordingly?

The following changes are working on my cross builders

// DRIVER-PASS-INCLUDES-SAME: "-internal-isystem" "[[RESOURCE]]{{/|\\\\}}include"
// DRIVER-PASS-INCLUDES-SAME: {{^}} "-internal-externc-isystem" "{{.*}}/usr/include"


// DRIVER-PASS-INCLUDES-SAME: "-internal-isystem" "[[RESOURCE]]{{/|\\\\}}include"
// DRIVER-PASS-INCLUDES-SAME: "-internal-externc-isystem" "{{.*}}/usr/include"