Remove -i command line option, add -imultilib
I discovered that '-i' is a command line option for the driver,
however it actually does not do anything and is not supported by any
other compiler. In fact, it is completely undocumented for Clang.
I found a couple of instances of people confusing it with one of
the variety of other command line options that control the driver.
Because of this, we should delete this option so that it is clear
that it isn't valid.
HOWEVER, I found that GCC DOES support -imultilib, which the -i
was hiding our lack of support for. We currently only use imultilib
for the purpose of forwarding to gfortran (in a specific test written
by chandlerc for this purpose).
imultilib is a rarely used (if ever?) feature that I could find no
references to on the internet, and in fact, my company's massive test
suite has zero references to it ever being used.
SO, this patch removes the -i option so that we will now give an error
on its usage (so that it won't be confused with -I), and replaces it with
-imultilib, which is now specified as a gfortran_group option.
Differential Revision: https://reviews.llvm.org/D44032
llvm-svn: 326623
2018-03-03 05:53:25 +08:00
|
|
|
// RUN: not %clang %s -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -ifoo -imultilib dir -### 2>&1 | \
|
2013-09-24 07:55:25 +08:00
|
|
|
// RUN: FileCheck %s
|
Remove -i command line option, add -imultilib
I discovered that '-i' is a command line option for the driver,
however it actually does not do anything and is not supported by any
other compiler. In fact, it is completely undocumented for Clang.
I found a couple of instances of people confusing it with one of
the variety of other command line options that control the driver.
Because of this, we should delete this option so that it is clear
that it isn't valid.
HOWEVER, I found that GCC DOES support -imultilib, which the -i
was hiding our lack of support for. We currently only use imultilib
for the purpose of forwarding to gfortran (in a specific test written
by chandlerc for this purpose).
imultilib is a rarely used (if ever?) feature that I could find no
references to on the internet, and in fact, my company's massive test
suite has zero references to it ever being used.
SO, this patch removes the -i option so that we will now give an error
on its usage (so that it won't be confused with -I), and replaces it with
-imultilib, which is now specified as a gfortran_group option.
Differential Revision: https://reviews.llvm.org/D44032
llvm-svn: 326623
2018-03-03 05:53:25 +08:00
|
|
|
// RUN: %clang %s -imultilib dir -### 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=MULTILIB
|
2018-01-11 04:23:45 +08:00
|
|
|
// RUN: not %clang %s -stdlibs=foo -hell -version -### 2>&1 | \
|
[Driver] Suggest correctly spelled driver options
Summary:
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
```
bin/opt -hel
opt: Unknown command line argument '-hel'. Try: 'bin/opt -help'
opt: Did you mean '-help'?
```
Clang, on the other hand, prior to this commit, does not:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel'
```
This commit makes use of the new libLLVMOption API from
https://reviews.llvm.org/D41732 in order to provide correct suggestions:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel', did you mean '-help'?
```
Test Plan: `check-clang`
Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno
Reviewed By: bruno
Subscribers: bruno, jroelofs, cfe-commits
Differential Revision: https://reviews.llvm.org/D41733
llvm-svn: 321917
2018-01-06 08:25:40 +08:00
|
|
|
// RUN: FileCheck %s --check-prefix=DID-YOU-MEAN
|
2016-01-26 10:23:05 +08:00
|
|
|
// RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -### -c -- %s 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=CL
|
[Driver] Suggest correctly spelled driver options
Summary:
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
```
bin/opt -hel
opt: Unknown command line argument '-hel'. Try: 'bin/opt -help'
opt: Did you mean '-help'?
```
Clang, on the other hand, prior to this commit, does not:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel'
```
This commit makes use of the new libLLVMOption API from
https://reviews.llvm.org/D41732 in order to provide correct suggestions:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel', did you mean '-help'?
```
Test Plan: `check-clang`
Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno
Reviewed By: bruno
Subscribers: bruno, jroelofs, cfe-commits
Differential Revision: https://reviews.llvm.org/D41733
llvm-svn: 321917
2018-01-06 08:25:40 +08:00
|
|
|
// RUN: %clang_cl -Brepo -### -- %s 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=CL-DID-YOU-MEAN
|
2017-05-24 22:57:17 +08:00
|
|
|
// RUN: not %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### -- %s 2>&1 | \
|
2016-01-26 10:23:05 +08:00
|
|
|
// RUN: FileCheck %s --check-prefix=CL-ERROR
|
[Driver] Suggest correctly spelled driver options
Summary:
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
```
bin/opt -hel
opt: Unknown command line argument '-hel'. Try: 'bin/opt -help'
opt: Did you mean '-help'?
```
Clang, on the other hand, prior to this commit, does not:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel'
```
This commit makes use of the new libLLVMOption API from
https://reviews.llvm.org/D41732 in order to provide correct suggestions:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel', did you mean '-help'?
```
Test Plan: `check-clang`
Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno
Reviewed By: bruno
Subscribers: bruno, jroelofs, cfe-commits
Differential Revision: https://reviews.llvm.org/D41733
llvm-svn: 321917
2018-01-06 08:25:40 +08:00
|
|
|
// RUN: not %clang_cl -helo -Werror=unknown-argument -### -- %s 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=CL-ERROR-DID-YOU-MEAN
|
2016-01-26 10:23:05 +08:00
|
|
|
// RUN: %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Wno-unknown-argument -### -- %s 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=SILENT
|
2018-01-14 01:09:11 +08:00
|
|
|
// RUN: not %clang -cc1as -hell --version -debug-info-macros 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=CC1AS-DID-YOU-MEAN
|
2018-01-16 05:05:40 +08:00
|
|
|
// RUN: not %clang -cc1asphalt -help 2>&1 | \
|
|
|
|
// RUN: FileCheck %s --check-prefix=UNKNOWN-INTEGRATED
|
2012-01-26 04:00:43 +08:00
|
|
|
|
2016-01-26 10:23:05 +08:00
|
|
|
// CHECK: error: unknown argument: '-cake-is-lie'
|
|
|
|
// CHECK: error: unknown argument: '-%0'
|
|
|
|
// CHECK: error: unknown argument: '-%d'
|
|
|
|
// CHECK: error: unknown argument: '-HHHH'
|
|
|
|
// CHECK: error: unknown argument: '-munknown-to-clang-option'
|
|
|
|
// CHECK: error: unknown argument: '-print-stats'
|
|
|
|
// CHECK: error: unknown argument: '-funknown-to-clang-option'
|
Remove -i command line option, add -imultilib
I discovered that '-i' is a command line option for the driver,
however it actually does not do anything and is not supported by any
other compiler. In fact, it is completely undocumented for Clang.
I found a couple of instances of people confusing it with one of
the variety of other command line options that control the driver.
Because of this, we should delete this option so that it is clear
that it isn't valid.
HOWEVER, I found that GCC DOES support -imultilib, which the -i
was hiding our lack of support for. We currently only use imultilib
for the purpose of forwarding to gfortran (in a specific test written
by chandlerc for this purpose).
imultilib is a rarely used (if ever?) feature that I could find no
references to on the internet, and in fact, my company's massive test
suite has zero references to it ever being used.
SO, this patch removes the -i option so that we will now give an error
on its usage (so that it won't be confused with -I), and replaces it with
-imultilib, which is now specified as a gfortran_group option.
Differential Revision: https://reviews.llvm.org/D44032
llvm-svn: 326623
2018-03-03 05:53:25 +08:00
|
|
|
// CHECK: error: unknown argument: '-ifoo'
|
|
|
|
// MULTILIB: warning: argument unused during compilation: '-imultilib dir'
|
[Driver] Suggest correctly spelled driver options
Summary:
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
```
bin/opt -hel
opt: Unknown command line argument '-hel'. Try: 'bin/opt -help'
opt: Did you mean '-help'?
```
Clang, on the other hand, prior to this commit, does not:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel'
```
This commit makes use of the new libLLVMOption API from
https://reviews.llvm.org/D41732 in order to provide correct suggestions:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel', did you mean '-help'?
```
Test Plan: `check-clang`
Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno
Reviewed By: bruno
Subscribers: bruno, jroelofs, cfe-commits
Differential Revision: https://reviews.llvm.org/D41733
llvm-svn: 321917
2018-01-06 08:25:40 +08:00
|
|
|
// DID-YOU-MEAN: error: unknown argument '-stdlibs=foo', did you mean '-stdlib=foo'?
|
|
|
|
// DID-YOU-MEAN: error: unknown argument '-hell', did you mean '-help'?
|
2018-01-11 04:23:45 +08:00
|
|
|
// DID-YOU-MEAN: error: unknown argument '-version', did you mean '--version'?
|
2016-01-26 10:23:05 +08:00
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-cake-is-lie'
|
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-%0'
|
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-%d'
|
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-HHHH'
|
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-munknown-to-clang-option'
|
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-print-stats'
|
|
|
|
// CL: warning: unknown argument ignored in clang-cl: '-funknown-to-clang-option'
|
[Driver] Suggest correctly spelled driver options
Summary:
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
```
bin/opt -hel
opt: Unknown command line argument '-hel'. Try: 'bin/opt -help'
opt: Did you mean '-help'?
```
Clang, on the other hand, prior to this commit, does not:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel'
```
This commit makes use of the new libLLVMOption API from
https://reviews.llvm.org/D41732 in order to provide correct suggestions:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel', did you mean '-help'?
```
Test Plan: `check-clang`
Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno
Reviewed By: bruno
Subscribers: bruno, jroelofs, cfe-commits
Differential Revision: https://reviews.llvm.org/D41733
llvm-svn: 321917
2018-01-06 08:25:40 +08:00
|
|
|
// CL-DID-YOU-MEAN: warning: unknown argument ignored in clang-cl '-Brepo' (did you mean '-Brepro'?)
|
2016-01-26 10:23:05 +08:00
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-cake-is-lie'
|
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-%0'
|
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-%d'
|
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-HHHH'
|
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-munknown-to-clang-option'
|
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-print-stats'
|
|
|
|
// CL-ERROR: error: unknown argument ignored in clang-cl: '-funknown-to-clang-option'
|
[Driver] Suggest correctly spelled driver options
Summary:
Depends on https://reviews.llvm.org/D41732.
Utilities such as `opt`, when invoked with arguments that are very
nearly spelled correctly, suggest the correctly spelled options:
```
bin/opt -hel
opt: Unknown command line argument '-hel'. Try: 'bin/opt -help'
opt: Did you mean '-help'?
```
Clang, on the other hand, prior to this commit, does not:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel'
```
This commit makes use of the new libLLVMOption API from
https://reviews.llvm.org/D41732 in order to provide correct suggestions:
```
bin/clang -hel
clang-6.0: error: unknown argument: '-hel', did you mean '-help'?
```
Test Plan: `check-clang`
Reviewers: yamaguchi, v.g.vassilev, teemperor, ruiu, bruno
Reviewed By: bruno
Subscribers: bruno, jroelofs, cfe-commits
Differential Revision: https://reviews.llvm.org/D41733
llvm-svn: 321917
2018-01-06 08:25:40 +08:00
|
|
|
// CL-ERROR-DID-YOU-MEAN: error: unknown argument ignored in clang-cl '-helo' (did you mean '-help'?)
|
2016-01-26 10:23:05 +08:00
|
|
|
// SILENT-NOT: error:
|
|
|
|
// SILENT-NOT: warning:
|
2018-01-14 01:09:11 +08:00
|
|
|
// CC1AS-DID-YOU-MEAN: error: unknown argument '-hell', did you mean '-help'?
|
|
|
|
// CC1AS-DID-YOU-MEAN: error: unknown argument '--version', did you mean '-version'?
|
|
|
|
// CC1AS-DID-YOU-MEAN: error: unknown argument '-debug-info-macros', did you mean '-debug-info-macro'?
|
2018-01-16 05:05:40 +08:00
|
|
|
// UNKNOWN-INTEGRATED: error: unknown integrated tool 'asphalt'. Valid tools include '-cc1' and '-cc1as'.
|
2013-09-24 07:27:32 +08:00
|
|
|
|
2013-09-26 03:07:08 +08:00
|
|
|
// RUN: %clang -S %s -o %t.s -Wunknown-to-clang-option 2>&1 | FileCheck --check-prefix=IGNORED %s
|
2013-09-24 07:27:32 +08:00
|
|
|
|
|
|
|
// IGNORED: warning: unknown warning option '-Wunknown-to-clang-option'
|