[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-02 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added subscribers: cfe-commits, jsji, jfb, kbarton, mgorny, nemanjai. Herald added a project: clang. This patch adds AIX toolchain infrastructure into driver, and enables AIX system linker invocation with some basic functionality support Repository: rG

[PATCH] D69620: Add AIX assembler support

2019-10-30 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. This is a follow on patch to D68340 . Given the AIX toolchain skeleton and system linker support introduced in D68340 ,

[PATCH] D69620: Add AIX assembler support

2019-11-16 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.h:26 + + bool hasIntegratedCPP() const override { return false; } + Xiangling_L wrote: > I saw a lot of other target also set

[PATCH] D69271: Add AIX toolchain and basic linker functionality

2019-10-21 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added subscribers: cfe-commits, jsji, jfb, kbarton, mgorny, nemanjai. Herald added a project: clang. stevewan abandoned this revision. Herald added subscribers: wuzish, ormris. This patch adds AIX toolchain infrastructure into driver, and enables AIX system

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-21 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 225925. stevewan marked 8 inline comments as done. stevewan added a comment. Tidy code with lambda expression Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68340/new/ https://reviews.llvm.org/D68340 Files:

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-21 Thread Steven Wan via Phabricator via cfe-commits
stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:35 + // Only support 32 and 64 bit + if (!IsArch32Bit && !IsArch64Bit) +llvm_unreachable("Unsupported bit width value"); jasonliu wrote: > Xiangling_L wrote: > > Is there any

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-24 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. In D68340#1720362 , @Yi-Hong.Lyu wrote: > Seems this commit broke the buildbot > http://lab.llvm.org:8011/builders/ppc64le-lld-multistage-test/builds/6806 @daltenty's patch rG201ed14aea8c

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-24 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 226304. stevewan added a comment. Capture local variable IsArch32Bit by value. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68340/new/ https://reviews.llvm.org/D68340 Files:

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-24 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked 2 inline comments as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:59 + + auto getCrt0Basename = [, ] { +// Enable gprofiling when "-pg" is specified. jasonliu wrote: > nit: There is no need to capture

[PATCH] D69356: [NFC] Rename LLVM_NO_DEAD_STRIP

2019-10-24 Thread Steven Wan via Phabricator via cfe-commits
stevewan accepted this revision. stevewan added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69356/new/ https://reviews.llvm.org/D69356

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-23 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked 3 inline comments as done. stevewan added inline comments. Comment at: clang/lib/Driver/CMakeLists.txt:33 ToolChains/Arch/X86.cpp + ToolChains/AIX.cpp ToolChains/Ananas.cpp jasonliu wrote: > Looks like this list is following alphabetical

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-23 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 226170. stevewan added a comment. Avoid blank else block when assertion is off Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68340/new/ https://reviews.llvm.org/D68340 Files:

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-18 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 225631. stevewan marked 25 inline comments as done. stevewan added reviewers: jasonliu, Xiangling_L. stevewan added a comment. Fix periods at the end of comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D68340: Add AIX toolchain and basic linker functionality

2019-10-17 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 225521. stevewan added a comment. Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68340/new/ https://reviews.llvm.org/D68340 Files: clang/lib/Driver/CMakeLists.txt

[PATCH] D69620: Add AIX assembler support

2019-11-19 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:45 + // Acccept any mixture of instructions. + CmdArgs.push_back("-many"); + Xiangling_L wrote: > GCC invokes system assembler also with

[PATCH] D69620: Add AIX assembler support

2019-11-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 231000. stevewan marked 12 inline comments as done. stevewan added a comment. Remove claimNoWarnArgs, limit the number of input files, and add more comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69620: Add AIX assembler support

2019-11-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:28 + const char *LinkingOutput) const { + claimNoWarnArgs(Args); + ArgStringList CmdArgs; stevewan

[PATCH] D69620: Add AIX assembler support

2019-11-29 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked 3 inline comments as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:68 + if (Inputs.size() != 1) +llvm_unreachable("Invalid number of input files."); + const InputInfo = Inputs[0];

[PATCH] D69620: Add AIX assembler support

2019-11-29 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 231579. stevewan added a comment. Herald added subscribers: kbarton, nemanjai. Add more input file handling 1. Check if the input file is of type Filename or Nothing, throw assertion otherwise. 2. Add a test case to verify the correct behaviour of

[PATCH] D69620: Add AIX assembler support

2019-12-02 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 231712. stevewan added a comment. State in the comment the expectation to driver in handling assembler source input when invoking as(1). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69620/new/

[PATCH] D69620: Add AIX assembler support

2019-11-29 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 231557. stevewan added a comment. Correct a typo in a comment. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69620/new/ https://reviews.llvm.org/D69620 Files: clang/lib/Driver/ToolChains/AIX.cpp

[PATCH] D69620: Add AIX assembler support

2019-11-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked 4 inline comments as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:28 + const char *LinkingOutput) const { + claimNoWarnArgs(Args); + ArgStringList CmdArgs; Xiangling_L

[PATCH] D69620: Add AIX assembler support

2019-11-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 230360. stevewan marked an inline comment as done. stevewan added a comment. Add "-u" to accept undefined symbol as extern. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69620/new/

[PATCH] D69620: Add AIX assembler support

2019-11-20 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:28 + const char *LinkingOutput) const { + claimNoWarnArgs(Args); + ArgStringList CmdArgs; stevewan

[PATCH] D74015: [AIX][Frontend] C++ ABI customizations for AIX boilerplate

2020-02-11 Thread Steven Wan via Phabricator via cfe-commits
stevewan added inline comments. Comment at: clang/lib/CodeGen/ItaniumCXXABI.cpp:520 + +class XLClangCXXABI final : public ItaniumCXXABI { +public: The class name here is inconsistent with how our ABI kind was called previously, as David pointed out. Maybe

[PATCH] D72736: [AIX] Add improved interface for retrieving load module paths

2020-01-17 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. Provided that you have squashed all changes into the latest commit in your branch, `git diff HEAD^ -U1` should emit the context you need. Adjust the number of lines of context accordingly to fit the size of your files. Repository: rG LLVM Github Monorepo

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-21 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. stevewan added reviewers: hubert.reinterpretcast, Xiangling_L, ZarkoCA, daltenty. On AIX, add '-bcdtors:all:0:s' to linker implicitly through driver, so that we can collect all static

[PATCH] D80532: [NFC] Fix formatting for the 'aix-ld.c' test case.

2020-05-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 266081. stevewan added a comment. Pass 'clang-format' checking. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80532/new/ https://reviews.llvm.org/D80532 Files: clang/test/Driver/aix-ld.c Index:

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-25 Thread Steven Wan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5bf2409a4e4d: [AIX] Add -bcdtors:all:0:s to linker to gather static init functions (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80532: [NFC] Fix formatting for the 'aix-ld.c' test case.

2020-05-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. stevewan added reviewers: ZarkoCA, hubert.reinterpretcast, daltenty. stevewan edited the summary of this revision. Based on comments received in D80415

[PATCH] D80532: [NFC] Fix formatting for the 'aix-ld.c' test case.

2020-05-25 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 266070. stevewan added a comment. Fix misalignment caused by tab. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80532/new/ https://reviews.llvm.org/D80532 Files: clang/test/Driver/aix-ld.c Index:

[PATCH] D80835: [AIX] Change the default target CPU to power4 for AIX on Power

2020-05-29 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. stevewan added reviewers: hubert.reinterpretcast, cebowleratibm, daltenty. This patch changes the AIX default target CPU to power4 since this is the the lowest arch for the lowest OS level

[PATCH] D80532: [NFC] Fix formatting for the 'aix-ld.c' test case.

2020-05-26 Thread Steven Wan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGa924dac44f31: [NFC] Fix formatting for the aix-ld.c test case. (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80532/new/

[PATCH] D80532: [NFC] Fix formatting for the 'aix-ld.c' test case.

2020-05-26 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 266263. stevewan added a comment. Add the two-space indent before continuations on a pipeine. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80532/new/ https://reviews.llvm.org/D80532 Files:

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-22 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 265765. stevewan added a comment. Address comments and fix windows compatibility issues with the test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80415/new/ https://reviews.llvm.org/D80415 Files:

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-22 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 265781. stevewan added a comment. Address furthur comments on the test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80415/new/ https://reviews.llvm.org/D80415 Files:

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-22 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 265813. stevewan added a comment. Incorporate the test case into 'aix-ld.c'. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80415/new/ https://reviews.llvm.org/D80415 Files:

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-22 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. I'm planning to post an NFC patch after this to fix the formatting for existing cases in 'aix-ld.c' so that everything is consistent. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80415/new/

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-22 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 265818. stevewan added a comment. Update check prefix based on comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80415/new/ https://reviews.llvm.org/D80415 Files: clang/lib/Driver/ToolChains/AIX.cpp

[PATCH] D80415: [AIX] Add '-bcdtors:all:0:s' to linker to gather static init functions

2020-05-22 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked 3 inline comments as done. stevewan added inline comments. Comment at: clang/test/Driver/aix-ld.cpp:2 +// Check powerpc-ibm-aix7.1.0.0, 32-bit. 'bcdtors' and argument order. +// RUN: %clangxx -no-canonical-prefixes %s 2>&1 -### \ +// RUN: -Wl,-bnocdtors

[PATCH] D81115: [PowerPC] Do not special case Darwin on PowerPC in target cpu handling

2020-06-05 Thread Steven Wan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG61cd264068ee: [PowerPC] Do not special case Darwin on PowerPC in target cpu handling (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81115: [PowerPC] Do not special case Darwin on PowerPC in target cpu handling

2020-06-05 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. The unit test failure (`instrprof-gcov-multithread_fork.test`) in pre merge checks is caused by another commit. See http://lab.llvm.org:8011/builders/llvm-avr-linux/builds/2205. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D80966: [codeview] Put !heapallocsite on calls to operator new

2020-06-05 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. Looks like this has broken the build bot? (see http://lab.llvm.org:8011/builders/llvm-avr-linux/builds/2205) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D80966/new/ https://reviews.llvm.org/D80966

[PATCH] D80835: [AIX] Change the default target CPU to power4 for AIX on Power

2020-06-03 Thread Steven Wan via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGba4afe6f7a84: [AIX] Change the default target CPU to power4 for AIX on Power (authored by stevewan). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D81115: [PowerPC] Do not special case Darwin on PowerPC in target cpu handling

2020-06-04 Thread Steven Wan via Phabricator via cfe-commits
stevewan updated this revision to Diff 268588. stevewan added a comment. Reduce the nested 'if' and reorder it to prefer the more likely case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81115/new/ https://reviews.llvm.org/D81115 Files:

[PATCH] D81115: [PowerPC] Do not check for non-Darwin in PowerPC target cpu handling

2020-06-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan created this revision. Herald added subscribers: cfe-commits, steven.zhang, shchenz, nemanjai. Herald added a project: clang. stevewan added reviewers: hubert.reinterpretcast, daltenty. Herald added a subscriber: wuzish. Since Darwin on PowerPC is no longer supported, we'll take the

[PATCH] D80835: [AIX] Change the default target CPU to power4 for AIX on Power

2020-06-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:301 +TargetCPUName = "pwr4"; + else if (!T.isOSDarwin()) { +if (T.getArch() == llvm::Triple::ppc64)

[PATCH] D82677: [Clang] Handle AIX Include management in the driver

2020-06-26 Thread Steven Wan via Phabricator via cfe-commits
stevewan marked an inline comment as done. stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:167 +void AIX::AddClangSystemIncludeArgs(const ArgList , +ArgStringList ) const { stevewan wrote: > I

[PATCH] D82677: [Clang] Handle AIX Include management in the driver

2020-06-26 Thread Steven Wan via Phabricator via cfe-commits
stevewan added inline comments. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:167 +void AIX::AddClangSystemIncludeArgs(const ArgList , +ArgStringList ) const { I don't think this is the revision you intended to post.

[PATCH] D82677: [Clang] Handle AIX Include management in the driver

2020-07-03 Thread Steven Wan via Phabricator via cfe-commits
stevewan accepted this revision. stevewan added a comment. LGTM with minor nit. I took a look at the failed tests in premerge checks, they didn't seem to be related, but please double check before you commit. Comment at: clang/lib/Driver/ToolChains/AIX.cpp:195 + // Return

[PATCH] D79842: [clang][Driver] Correct tool search path priority

2020-07-08 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. In D79842#2138857 , @DavidSpickett wrote: > Right, I see the issue. > > The code that gets the default triple name > (https://reviews.llvm.org/D13340?id=36227#inline-108606) looks up the one you > have in cmake, not the actual

[PATCH] D79842: [clang][Driver] Correct tool search path priority

2020-07-07 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. Yes, this issue was hit with the reland applied. When given a `--` format LLVM_DEFAULT_TARGET_TRIPLE, Clang would expand the target triple to `---`, and therefore causes the name mismatch between what the driver searches for and what the test case creates as the

[PATCH] D79842: [clang][Driver] Correct tool search path priority

2020-07-06 Thread Steven Wan via Phabricator via cfe-commits
stevewan added a comment. The test was failing on Linux if I set LLVM_DEFAULT_TARGET_TRIPLE. For example if I set it to`powerpc64le-linux-gnu` clang actually uses "powerpc64le-unknown-linux-gnu". Would you be able to provide a fix to this? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D83055: [clang][Driver] Fix tool path priority test failures

2020-07-10 Thread Steven Wan via Phabricator via cfe-commits
stevewan added inline comments. Comment at: clang/test/Driver/program-path-priority.c:117 +/// Check file exists first in case $DEFAULT_TRIPLE == %target_triple +// RUN: file -E %t/$DEFAULT_TRIPLE-gcc 2>&1 > /dev/null && \ +// RUN: mv %t/$DEFAULT_TRIPLE-gcc %t/prefix || true

[PATCH] D83055: [clang][Driver] Fix tool path priority test failures

2020-07-09 Thread Steven Wan via Phabricator via cfe-commits
stevewan added inline comments. Comment at: clang/test/Driver/program-path-priority.c:117 +/// Check file exists first in case $DEFAULT_TRIPLE == %target_triple +// RUN: file -E %t/$DEFAULT_TRIPLE-gcc 2>&1 > /dev/null && \ +// RUN: mv %t/$DEFAULT_TRIPLE-gcc %t/prefix || true

[PATCH] D83055: [clang][Driver] Fix tool path priority test failures

2020-07-13 Thread Steven Wan via Phabricator via cfe-commits
stevewan accepted this revision. stevewan added a comment. This revision is now accepted and ready to land. This LGTM, but since I'm not most familiar with the type 1 failure in description, let's see if other reviewers have further comments. Repository: rG LLVM Github Monorepo CHANGES