[PATCH] D55503: Change llvm call once check for building Swift for PowerPC(ppc64le)

Sarvesh Tamba via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 13 02:40:49 PST 2018


sarveshtamba added a comment.

Hi, The changes committed as a part of commit r348970 are different from the original patch which I submitted and which also fixed build issues while building Swift 5.0 toolchain (lldb component). The new patch committed still breaks the swift toolchain build as before:-

[32/914] Building CXX object source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectPlatform.cpp.o
FAILED: source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectPlatform.cpp.o
/usr/bin/clang++   -DGTEST_HAS_RTTI=0 -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_CONFIGURATION_RELEASE -D_DEBUG -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Isource/Commands -I/root/swift-source/lldb/source/Commands -Iinclude -I/root/swift-source/lldb/include -I/root/swift-source/build/buildbot_linux/llvm-linux-powerpc64le/include -I/root/swift-source/build/buildbot_linux/llvm-linux-powerpc64le/tools/clang/include -I/root/swift-source/llvm/include -I/include -I/root/swift-source/llvm/tools/clang/include -I/root/swift-source/build/buildbot_linux/swift-linux-powerpc64le/include -I/root/swift-source/swift/include -I/root/swift-source/lldb/source -I/usr/include/python3.5m -I/root/swift-source/lldb/tools/clang/include -I../clang/include -I/usr/include/libxml2 -I/root/swift-source/lldb/source/. -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -w -fdiagnostics-color -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3    -UNDEBUG  -fno-exceptions -fno-rtti -MMD -MT source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectPlatform.cpp.o -MF source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectPlatform.cpp.o.d -o source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectPlatform.cpp.o -c /root/swift-source/lldb/source/Commands/CommandObjectPlatform.cpp
/root/swift-source/lldb/source/Commands/CommandObjectPlatform.cpp:1248:7: error: no matching function for call to 'call_once'

  llvm::call_once(g_once_flag, []() {
  ^~~~~~~~~~~~~~~

/root/swift-source/llvm/include/llvm/Support/Threading.h:100:8: note: candidate function [with Function = (lambda at /root/swift-source/lldb/source/Commands/CommandObjectPlatform.cpp:1248:36), Args = <>] not viable: no known conversion from 'std::once_flag' to 'llvm::once_flag &' for 1st argument

  void call_once(once_flag &flag, Function &&F, Args &&... ArgList) {
       ^

1 error generated.
[33/914] Building CXX object source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectLog.cpp.o
[34/914] Building CXX object source/Expression/CMakeFiles/lldbExpression.dir/REPL.cpp.o
[35/914] Building CXX object source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectMemory.cpp.o
[36/914] Building CXX object source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectPlugin.cpp.o
[37/914] Building CXX object source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectQuit.cpp.o
[38/914] Building CXX object source/Expression/CMakeFiles/lldbExpression.dir/UserExpression.cpp.o
[39/914] Building CXX object source/Commands/CMakeFiles/lldbCommands.dir/CommandObjectProcess.cpp.o
ninja: build stopped: subcommand failed.
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting
./utils/build-script: fatal error: command terminated with a non-zero exit status 1, aborting

I have revised the patch once again to include __ppc__ and __PPC__ besides my original changes for PowerPC64LE & tested the same for PowerPC64LE.

Please review.

PS:- I know it can get a bit confusing, but just to clarify, "(defined(__PPC__) && defined(__LITTLE_ENDIAN__))", was not an additional OR condition within the original !(platform checks) i.e. not within "!(defined(__NetBSD__) || defined(__OpenBSD__) || defined(__ppc__))", but was a separate OR condition outside, i.e. !(platform checks) || (PPC && LE).


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55503/new/

https://reviews.llvm.org/D55503





More information about the llvm-commits mailing list