[PATCH] D140867: [C++20] [Modules] Don't generate global ctors/dtors for variables which are available externally

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 10 19:44:27 PST 2023


ChuanqiXu added a comment.

In D140867#4040590 <https://reviews.llvm.org/D140867#4040590>, @Jake-Egan wrote:

> In D140867#4038388 <https://reviews.llvm.org/D140867#4038388>, @ChuanqiXu wrote:
>
>> In D140867#4036239 <https://reviews.llvm.org/D140867#4036239>, @Jake-Egan wrote:
>>
>>> Hi, this test is failing on AIX, could you take a look please? https://lab.llvm.org/buildbot/#/builders/214/builds/5242/steps/6/logs/FAIL__Clang__pr59765-modules-global-ctor-dtor_cppm
>>
>> I fixed the failure by restricting the targets in https://github.com/llvm/llvm-project/commit/9cb1298dcc85c357eb97ed0bdc3c82c5d011f6f6. And the best approach is to add a separate test for AIX but I don't have an AIX machine. You can add it if you are interested.
>
> Thanks for looking into it. Unfortunately the test is still failing on AIX after this commit. Which is odd because your fix does make sense to me. I'm not sure why the test is still being run on AIX. https://lab.llvm.org/buildbot/#/builders/214/builds/5267

Weird. I compiled `PowerPC` target locally and change the test into:

  // RUN: %clang_cc1 -std=c++20 --target=powerpc-ibm-aix-xcoff %t/M.cppm -triple %itanium_abi_triple -emit-module-interface -o %t/M.pcm
  // RUN: %clang_cc1 -std=c++20 --target=powerpc-ibm-aix-xcoff %t/M.pcm -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/M.cppm
  // RUN: %clang_cc1 -std=c++20 --target=powerpc-ibm-aix-xcoff %t/Use.cpp -fprebuilt-module-path=%t -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %t/Use.cpp

Then when I run the test, it tells me it is unsupported (as expect).

Would you like to take a double look?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140867



More information about the cfe-commits mailing list