This generalises the GetXcodeSDKPath hook to a GetSDKRoot path which
will be re-used for the Windows support to compute a language specific
SDK path on the platform. Because there may be other options that we
wish to use to compute the SDK path, sink the XcodeSDK parameter into
a structure which can pass a disaggregated set of options. Furthermore,
optionalise the parameter as Xcode is not available for all platforms.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This change broke building with GCC:
samu: job failed: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DHAVE_ROUND -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_ASSERTIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb_build/source/Host -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/source/Host -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb_build/include -I/usr/lib/llvm/17/include -I/usr/include/python3.11 -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/tools/clang/include -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb_build/../clang/include -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/source -I/var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb_build/source -isystem /usr/include/libxml2 -march=znver2 --param=l1-cache-size=32 --param=l1-cache-line-size=64 -O2 -pipe -frecord-gcc-switches -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-stringop-truncation -std=c++17 -UNDEBUG -MD -MT source/Host/CMakeFiles/lldbHost.dir/posix/PipePosix.cpp.o -MF source/Host/CMakeFiles/lldbHost.dir/posix/PipePosix.cpp.o.d -o source/Host/CMakeFiles/lldbHost.dir/posix/PipePosix.cpp.o -c /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/source/Host/posix/PipePosix.cpp In file included from /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Host/posix/HostInfoPosix.h:12, from /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Host/linux/HostInfoLinux.h:12, from /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Host/HostInfo.h:43, from /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/source/Host/posix/PipePosix.cpp:10: /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Host/HostInfoBase.h:130:29: error: declaration of ‘std::optional<lldb_private::XcodeSDK> lldb_private::HostInfoBase::SDKOptions::XcodeSDK’ changes meaning of ‘XcodeSDK’ [-Wchanges-meaning] 130 | std::optional<XcodeSDK> XcodeSDK; | ^~~~~~~~ /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Host/HostInfoBase.h:130:19: note: used here to mean ‘class lldb_private::XcodeSDK’ 130 | std::optional<XcodeSDK> XcodeSDK; | ^~~~~~~~ In file included from /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Host/HostInfoBase.h:16: /var/tmp/portage/dev-util/lldb-17.0.0_pre20230429/work/lldb/include/lldb/Utility/XcodeSDK.h:24:7: note: declared here 24 | class XcodeSDK { | ^~~~~~~~ samu: subcommands failed
Comment Actions
I'm seeing the same build failures reported by mgorny. Would you consider reverting this patch until you can fix it?
Comment Actions
I’m also seeing this fail on 2 buildbots:
https://lab.llvm.org/buildbot/#/builders/217/builds/20568
https://lab.llvm.org/buildbot/#/builders/243/builds/5576