History log of /llvm-project/clang/test/Driver/module-output.cppm (Results 1 – 14 of 14)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# e44c28f0 18-Nov-2024 Krzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>

[clang] Replace "can't" and "can not" in diagnostics with "cannot" (#116623)

See
https://discourse.llvm.org/t/cant-cannot-can-not-in-diagnostic-messages/83171


Revision tags: llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7
# 9ca2d602 28-May-2024 Fangrui Song <i@maskray.me>

[Driver][test] Replace legacy -target with --target=

Similar to previous cleanup.

While changing mips* tests, change some -no-integrated-as to the
recommended -fno-integrated-as.


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4
# 72c29fa9 03-Apr-2024 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[C++20] [Modules] [Driver] Emit unused argument warning if we use '-fmodule-output' with non-module input

We required the file name of an 'importable module unit' should end
with .cppm (or .ccm, .cx

[C++20] [Modules] [Driver] Emit unused argument warning if we use '-fmodule-output' with non-module input

We required the file name of an 'importable module unit' should end
with .cppm (or .ccm, .cxxm, .c++m).

But the driver can accept '-fmodule-output' for files with normal
suffixes (e.g., .cpp). This is somewhat inconsistency.

In this patch, we only claim the option `-fmodule-output` is used if
the type of the input file is modules related. Then now the compiler
will emit 'unused argument' warnings if the input file is not modules
related.

show more ...


Revision tags: llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2
# f39c399d 01-Aug-2023 Fangrui Song <i@maskray.me>

[Driver] -###: exit with code 1 if hasErrorOccurred

The exit code for -### is inconsistent. Unrecognized options lead to
exit code 1, as expected. However, most others errors (including invalid
opti

[Driver] -###: exit with code 1 if hasErrorOccurred

The exit code for -### is inconsistent. Unrecognized options lead to
exit code 1, as expected. However, most others errors (including invalid
option value) lead to exit code 0, differing from GCC and most utilities.

This is a longstanding quirk of -###, and we didn't fix it because many
driver tests need adjustment.

Change -### to be similar to -fdriver-only -v and exit with code 1.

This requires fixing many driver tests, but the end result gives us
stronger tests.

* Existing `RUN: %clang -### ...` tests usually don't use `CHECK-NOT: error:` or `--implicit-check-not=error:`.
If a change introduces an error, such a change usually cannot be detected.
* Many folks contributing new tests don't know `-fdriver-only -v`.
To test no driver error/warning for new tests, they can use the familiar `-### -Werror`
instead of `-fdriver-only -v -Werror`.

An incomplete list of prerequisite test improvement:

* 2f79bb10461d114783a1548201928549ace09755: add -nogpulib to some AMDGPU tests
* 9155e517e6e1cda474d0d0fa82f71696c325bc10: add --cuda-path= (test w/ and w/o /usr/local/cuda)
* 80765ede5bbcca1364c2d4ae06127011eaba6389: -mcpu=native may return either 0 or 1, depending on whether `--target=` specifies a native target
* abae53f43f0d1da8d8e421f4a628d7ec64d6e365: fix -fuse-ld=lld misuses (test w/o and w/o /usr/local/bin/ld.lld)
* ab68df505e5bb8808ee44f53044b50ca7575098e: add -resource-dir= and -fvisibility=hidden
to some -fsanitize=cfi tests
* d5ca1602f64114f612ad5630f04e4aa90591c78d: --rtlib=platform without --unwindlib= may fail if CLANG_DEFAULT_UNWINDLIB=unwindlib

Reviewed By: jhuber6, yaxunl, dblaikie

Differential Revision: https://reviews.llvm.org/D156363

show more ...


# 662c9ef1 31-Jul-2023 Fangrui Song <i@maskray.me>

Revert D156363 "[Driver] -###: exit with code 1 if hasErrorOccurred"

This reverts commit 8c3550b1a78fde7bf28f420da8447d9fde37017f.

clang/test/Driver/fsanitize.c has a mysterious failure worth
inves

Revert D156363 "[Driver] -###: exit with code 1 if hasErrorOccurred"

This reverts commit 8c3550b1a78fde7bf28f420da8447d9fde37017f.

clang/test/Driver/fsanitize.c has a mysterious failure worth
investigation.

show more ...


# 8c3550b1 30-Jul-2023 Fangrui Song <i@maskray.me>

[Driver] -###: exit with code 1 if hasErrorOccurred

The exit code for -### is inconsistent. Unrecognized options lead to
exit code 1, as expected. However, most others errors (including invalid
opti

[Driver] -###: exit with code 1 if hasErrorOccurred

The exit code for -### is inconsistent. Unrecognized options lead to
exit code 1, as expected. However, most others errors (including invalid
option value) lead to exit code 0, differing from GCC and most utilities.

This is a longstanding quirk of -###, and we didn't fix it because many
driver tests need adjustment.

Change -### to be similar to -fdriver-only -v and exit with code 1.

This requires fixing many driver tests, but the end result gives us
stronger tests.

* Existing `RUN: %clang -### ...` tests usually don't use `CHECK-NOT: error:` or `--implicit-check-not=error:`.
If a change introduces an error, such a change usually cannot be detected.
* Many folks contributing new tests don't know `-fdriver-only -v`.
To test no driver error/warning for new tests, they can use the familiar `-### -Werror`
instead of `-fdriver-only -v -Werror`.

An incomplete list of prerequisite test improvement:

* 2f79bb10461d114783a1548201928549ace09755: add -nogpulib to some AMDGPU tests
* 9155e517e6e1cda474d0d0fa82f71696c325bc10: add --cuda-path= (test w/ and w/o /usr/local/cuda)
* 80765ede5bbcca1364c2d4ae06127011eaba6389: -mcpu=native may return either 0 or 1, depending on whether `--target=` specifies a native target
* abae53f43f0d1da8d8e421f4a628d7ec64d6e365: fix -fuse-ld=lld misuses (test w/o and w/o /usr/local/bin/ld.lld)

Reviewed By: jhuber6, yaxunl, dblaikie

Differential Revision: https://reviews.llvm.org/D156363

show more ...


Revision tags: llvmorg-17.0.0-rc1
# 2f372aec 29-Jul-2023 Fangrui Song <i@maskray.me>

Revert D156363 "[Driver] -###: exit with code 1 if hasErrorOccurred"

This reverts commit e39bf32b3bc2f0cc21d783ba789bd82553493875.

Some tests have different behaviors depent on whether certain dire

Revert D156363 "[Driver] -###: exit with code 1 if hasErrorOccurred"

This reverts commit e39bf32b3bc2f0cc21d783ba789bd82553493875.

Some tests have different behaviors depent on whether certain directories/files are present on the host.
An incomplete list from https://lab.llvm.org/buildbot/#/builders/109/builds/70149

csky-toolchain.c
riscv*-toolchain.c
fuchsia.*
hip-*
ohos.c

show more ...


# e39bf32b 29-Jul-2023 Fangrui Song <i@maskray.me>

[Driver] -###: exit with code 1 if hasErrorOccurred

The exit code for -### is inconsistent. Unrecognized options lead to
exit code 1, as expected. However, most others errors (including invalid
opti

[Driver] -###: exit with code 1 if hasErrorOccurred

The exit code for -### is inconsistent. Unrecognized options lead to
exit code 1, as expected. However, most others errors (including invalid
option value) lead to exit code 0, differing from GCC and most utilities.

This is a longstanding quirk of -###, and we didn't fix it because many
driver tests need adjustment.

Change -### to be similar to -fdriver-only -v and exit with code 1.

This requires fixing many driver tests, but the end result gives us
stronger tests.

* Existing `RUN: %clang -### ...` tests usually don't use `CHECK-NOT: error:` or `--implicit-check-not=error:`.
If a change introduces an error, such a change usually cannot be detected.
* Many folks contributing new tests don't know `-fdriver-only -v`.
To test no driver error/warning for new tests, they can use the familiar `-### -Werror`
instead of `-fdriver-only -v -Werror`.

Reviewed By: jhuber6, yaxunl, dblaikie

Differential Revision: https://reviews.llvm.org/D156363

show more ...


Revision tags: llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init
# a7b47fa1 18-Jan-2023 Jake Egan <jakeegan10@gmail.com>

[NFC] Disable test on AIX due to different default output

Previous attempt to stop this test from running on AIX didn't work,
so revert it and require not system-aix instead.

This reverts commit b1

[NFC] Disable test on AIX due to different default output

Previous attempt to stop this test from running on AIX didn't work,
so revert it and require not system-aix instead.

This reverts commit b1ac375e11c801be2a1e07e87be91ae54decf2eb.

show more ...


# fcb6afb5 16-Jan-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[Driver] [C++20] [Modules] Don't emit unused-argument warning for '-fmodule-output' and '-fmodule-output='

Suppres the r unused-argument warning for -fmodule-output according to
the discussion thre

[Driver] [C++20] [Modules] Don't emit unused-argument warning for '-fmodule-output' and '-fmodule-output='

Suppres the r unused-argument warning for -fmodule-output according to
the discussion thread in
https://gcc.gnu.org/pipermail/gcc/2022-December/240239.html.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D140001

show more ...


# 3e9e8d6e 16-Jan-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

The patch implements `-fmodule-output=`. This is helpful if the build
systems want to generate these output files in other places which is n

[Driver] [C++20] [Modules] Support -fmodule-output= (2/2)

The patch implements `-fmodule-output=`. This is helpful if the build
systems want to generate these output files in other places which is not
the same with -o specified or the input file lived.

Reviewed By: dblaikie, iains

Differential Revision: https://reviews.llvm.org/D137059

show more ...


# b1ac375e 16-Jan-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[NFC] Only run clang/test/Driver/module-output.cppm on x86 registered targets

On other targets (like ppc64-aix), the default output for `-c` may be `.s` instead of `.o`,
which makes the test failing

[NFC] Only run clang/test/Driver/module-output.cppm on x86 registered targets

On other targets (like ppc64-aix), the default output for `-c` may be `.s` instead of `.o`,
which makes the test failing. The patch require the test only run on
x86 registered targets to avoid the problem.

show more ...


# 6f2e7819 16-Jan-2023 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[NFC] Require tests to skip on windows to avoid handling the different
slash in the filesystem

The modified test fails on windows for the diffeent slash direction ('/'
in linux and '/' on windows).

[NFC] Require tests to skip on windows to avoid handling the different
slash in the filesystem

The modified test fails on windows for the diffeent slash direction ('/'
in linux and '/' on windows). The patch requires the test to skip on
windows to avoid such differences.

show more ...


Revision tags: llvmorg-15.0.7
# f89327e2 28-Dec-2022 Chuanqi Xu <yedeng.yd@linux.alibaba.com>

[Driver] [Modules] Support -fmodule-output (1/2)

Patches to support the one-phase compilation model for modules.

The behavior:
(1) If -o and -c is specified , the module file is in the same path
wi

[Driver] [Modules] Support -fmodule-output (1/2)

Patches to support the one-phase compilation model for modules.

The behavior:
(1) If -o and -c is specified , the module file is in the same path
within the same directory as the output the -o specified and with a new
suffix .pcm.
(2) Otherwise, the module file is in the same path within the working
directory directory with the name of the input file with a new suffix
.pcm

For example,

```
Hello.cppm Use.cpp
```

A trivial one and the contents are ignored. When we run:

```
clang++ -std=c++20 -fmodule-output Hello.cppm -c
```

The directory would look like:

```
Hello.cppm Hello.o Hello.pcm Use.cpp
```

And if we run:

```
clang++ -std=c++20 -fmodule-output Hello.cppm -c -o output/Hello.o
```

Then the `output` directory may look like:

```
Hello.o Hello.pcm
```

Reviewed By: dblaikie, iains, tahonermann

Differential Revision: https://reviews.llvm.org/D137058

show more ...