Skip to content

Commit 26182df

Browse files
committed
[docs] Replace deprecated -target with --target=
1 parent 6a8a423 commit 26182df

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

clang/docs/OpenCLSupport.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ To enable modules for OpenCL:
113113

114114
.. code-block:: console
115115
116-
$ clang -target spir-unknown-unknown -c -emit-llvm -Xclang -finclude-default-header -fmodules -fimplicit-module-maps -fmodules-cache-path=<path to the generated module> test.cl
116+
$ clang --target=spir-unknown-unknown -c -emit-llvm -Xclang -finclude-default-header -fmodules -fimplicit-module-maps -fmodules-cache-path=<path to the generated module> test.cl
117117
118118
Another way to circumvent long parsing latency for the OpenCL builtin
119119
declarations is to use mechanism enabled by :ref:`-fdeclare-opencl-builtins

clang/docs/UsersManual.rst

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,8 +3305,8 @@ to the target, for example:
33053305

33063306
.. code-block:: console
33073307
3308-
$ clang -target nvptx64-unknown-unknown test.cl
3309-
$ clang -target amdgcn-amd-amdhsa -mcpu=gfx900 test.cl
3308+
$ clang --target=nvptx64-unknown-unknown test.cl
3309+
$ clang --target=amdgcn-amd-amdhsa -mcpu=gfx900 test.cl
33103310
33113311
Compiling to bitcode can be done as follows:
33123312

@@ -3390,13 +3390,13 @@ Some extra options are available to support special OpenCL features.
33903390

33913391
.. code-block:: console
33923392
3393-
$ clang -c -target spirv64 -cl-ext=-cl_khr_fp64 test.cl
3393+
$ clang -c --target=spirv64 -cl-ext=-cl_khr_fp64 test.cl
33943394
33953395
Enabling all extensions except double support in R600 AMD GPU can be done using:
33963396

33973397
.. code-block:: console
33983398
3399-
$ clang -target r600 -cl-ext=-all,+cl_khr_fp16 test.cl
3399+
$ clang --target=r600 -cl-ext=-all,+cl_khr_fp16 test.cl
34003400
34013401
Note that some generic targets e.g. SPIR/SPIR-V enable all extensions/features in
34023402
clang by default.
@@ -3417,13 +3417,13 @@ There is a set of concrete HW architectures that OpenCL can be compiled for.
34173417

34183418
.. code-block:: console
34193419
3420-
$ clang -target amdgcn-amd-amdhsa -mcpu=gfx900 test.cl
3420+
$ clang --target=amdgcn-amd-amdhsa -mcpu=gfx900 test.cl
34213421
34223422
- For Nvidia architectures:
34233423

34243424
.. code-block:: console
34253425
3426-
$ clang -target nvptx64-unknown-unknown test.cl
3426+
$ clang --target=nvptx64-unknown-unknown test.cl
34273427
34283428
34293429
Generic Targets
@@ -3433,8 +3433,8 @@ Generic Targets
34333433

34343434
.. code-block:: console
34353435
3436-
$ clang -target spirv32 -c test.cl
3437-
$ clang -target spirv64 -c test.cl
3436+
$ clang --target=spirv32 -c test.cl
3437+
$ clang --target=spirv64 -c test.cl
34383438
34393439
More details can be found in :ref:`the SPIR-V support section <spir-v>`.
34403440

@@ -3445,8 +3445,8 @@ Generic Targets
34453445

34463446
.. code-block:: console
34473447
3448-
$ clang -target spir test.cl -emit-llvm -c
3449-
$ clang -target spir64 test.cl -emit-llvm -c
3448+
$ clang --target=spir test.cl -emit-llvm -c
3449+
$ clang --target=spir64 test.cl -emit-llvm -c
34503450
34513451
Clang will generate SPIR v1.2 compatible IR for OpenCL versions up to 2.0 and
34523452
SPIR v2.0 for OpenCL v2.0 or C++ for OpenCL.
@@ -3678,7 +3678,7 @@ Example of use:
36783678
.. code-block:: console
36793679
36803680
clang -cl-std=clc++1.0 test.clcpp
3681-
clang -cl-std=clc++ -c -target spirv64 test.cl
3681+
clang -cl-std=clc++ -c --target=spirv64 test.cl
36823682
36833683
36843684
By default, files with ``.clcpp`` extension are compiled with the C++ for
@@ -3926,8 +3926,8 @@ Example usage for OpenCL kernel compilation:
39263926

39273927
.. code-block:: console
39283928
3929-
$ clang -target spirv32 -c test.cl
3930-
$ clang -target spirv64 -c test.cl
3929+
$ clang --target=spirv32 -c test.cl
3930+
$ clang --target=spirv64 -c test.cl
39313931
39323932
Both invocations of Clang will result in the generation of a SPIR-V binary file
39333933
`test.o` for 32 bit and 64 bit respectively. This file can be imported
@@ -3944,7 +3944,7 @@ the command line.
39443944

39453945
.. code-block:: console
39463946
3947-
$ clang -target spirv32 -fintegrated-objemitter -c test.cl
3947+
$ clang --target=spirv32 -fintegrated-objemitter -c test.cl
39483948
39493949
Note that only very basic functionality is supported at this point and therefore
39503950
it is not suitable for arbitrary use cases. This feature is only enabled when clang
@@ -3959,7 +3959,7 @@ installation instructions
39593959

39603960
.. code-block:: console
39613961
3962-
$ clang -target spirv64 test1.cl test2.cl
3962+
$ clang --target=spirv64 test1.cl test2.cl
39633963
39643964
More information about the SPIR-V target settings and supported versions of SPIR-V
39653965
format can be found in `the SPIR-V target guide

0 commit comments

Comments
 (0)