Skip to content

Commit cce2876

Browse files
committed
Update and integrate LLVM documentation
The LLVM MBS toolchain plugin help is integrated into the CDT Getting Started guide. The 'Emit LLVM IR' tool option is documented and disabled by default. Instances of "MacOS X" in MBS toolchain display strings are replaced with "macOS".
1 parent 9d9d71e commit cce2876

File tree

13 files changed

+61
-74
lines changed

13 files changed

+61
-74
lines changed

FAQ/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2140,8 +2140,9 @@ For macOS Sierra (10.12), there seems to be additional problems with GDB
21402140
that might make it unusable, see the [GDB bug
21412141
report](https://sourceware.org/bugzilla/show_bug.cgi?id=20266).
21422142
2143-
GDB does not support local macOS application debugging on Apple silicon
2144-
(AArch64) at present. It is necessary to use the LLDB debugger instead.
2143+
> [!NOTE]
2144+
> GDB does not support local macOS application debugging on Apple silicon
2145+
> (AArch64) at present. It is necessary to use the LLDB debugger instead.
21452146
21462147
#### How do I get the LLDB debugger?
21472148
@@ -2209,7 +2210,7 @@ with
22092210
22102211
#### How do I install the LLDB debugger integration?
22112212
2212-
1. Go to Help \> Install new Software
2213+
1. Go to Help > Install new Software
22132214
2. Select the CDT update site (9.1 or greater)
22142215
3. Under **CDT Optional Features**, select **C/C++ LLDB Debugger
22152216
Integration**
@@ -2359,8 +2360,8 @@ setvbuf(stderr, NULL, _IONBF, 0);
23592360
CDT does not come with a compiler, so if you do not have one you will
23602361
need to install one. Follows are options available to you:
23612362
2362-
- macOS: Install Xcode from the App Store or from Apple Developer web
2363-
site.
2363+
- macOS: Install the _Xcode Command Line Tools_ from the App Store or
2364+
from Apple Developer web site.
23642365
23652366
- Linux: If not already installed, it should be available in your
23662367
distribution's package system on your installation CDs.

build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ TargetName.gnu.lib=Gnu Static Library
2828
TargetName.cygw.exe=Cygwin Executable
2929
TargetName.cygw.so=Cygwin DLL
3030
TargetName.cygw.lib=Cygwin Library
31-
TargetName.macosx.exe=MacOS X Executable
32-
TargetName.macosx.so=MacOS X Shared Library
33-
TargetName.macosx.lib=MacOS X Static Library
31+
TargetName.macosx.exe=macOS Executable
32+
TargetName.macosx.so=macOS Shared Library
33+
TargetName.macosx.lib=macOS Static Library
3434
TargetName.solaris.exe=Solaris Gnu Executable
3535
TargetName.solaris.so=Solaris Gnu Shared Library
3636
TargetName.solaris.lib=Solaris Gnu Static Library
@@ -57,7 +57,7 @@ ToolChainName.Dbg=GCC Tool Chain
5757
ToolChainName.Linux=Linux GCC
5858
ToolChainName.Cygwin=Cygwin GCC
5959
ToolChainName.MinGW=MinGW GCC
60-
ToolChainName.Macosx=MacOSX GCC
60+
ToolChainName.Macosx=macOS GCC
6161
ToolChainName.Solaris=Solaris GCC
6262

6363
# Generic platform names
@@ -96,8 +96,8 @@ ToolName.linker.mingw.gnu.c=MinGW C Linker
9696
ToolName.linker.mingw.gnu.cpp=MinGW C++ Linker
9797

9898
# Mach-O tool names
99-
ToolName.linker.macosx.c = MacOS X C Linker
100-
ToolName.linker.macosx.cpp = MacOS X C++ Linker
99+
ToolName.linker.macosx.c = macOS C Linker
100+
ToolName.linker.macosx.cpp = macOS C++ Linker
101101

102102
#Solaris tool names
103103
ToolName.compiler.solaris.c = Solaris C Compiler

doc/org.eclipse.cdt.doc.user/build.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ bin.includes = about.html,\
3232
reference/,\
3333
tasks/,\
3434
toc.xml,\
35-
toc_LLVM.xml,\
3635
topics_Concepts.xml,\
3736
topics_Getting_Started.xml,\
3837
topics_Reference.xml,\

doc/org.eclipse.cdt.doc.user/plugin.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@
1414
file="toc.xml"
1515
primary="true">
1616
</toc>
17-
<toc
18-
file="toc_LLVM.xml"
19-
primary="true">
20-
</toc>
2117
<index path="index"/>
2218
</extension>
2319

doc/org.eclipse.cdt.doc.user/setting_up_eclipse_cdt/src/eclipse.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@
246246
<para>For Linux, select "Linux GCC"</para>
247247
</listitem>
248248
<listitem>
249-
<para>For Mac OS X, select "MacOSX GCC"</para>
249+
<para>For macOS, select "macOS GCC"</para>
250250
</listitem>
251251
<listitem>
252252
<para>Do not use "Cross GCC"! Unfortunately this option may be

doc/org.eclipse.cdt.doc.user/src/getting_started/index_mbs.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,5 @@ xref:cdt_w_build.adoc[Building a project]
4343
xref:cdt_w_debug.adoc[Debugging a project]
4444

4545
xref:cdt_w_existing_code.adoc[Importing your C/{cpp} source files into Eclipse]
46+
47+
xref:../llvm/user_manual.adoc[LLVM with Clang/GCC for Eclipse CDT]

doc/org.eclipse.cdt.doc.user/src/llvm/general.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ endif::[]
3030

3131
== General information
3232

33-
LLVM with Clang/GCC for Eclipse CDT plug-in provides LLVM toolchain with
34-
Clang or llvm-gcc compiler to compile C/(cpp} programs.
33+
The LLVM with Clang/GCC for Eclipse CDT plug-in integrates an LLVM toolchain using
34+
the Clang or llvm-gcc compiler with the CDT managed build system to compile C/(cpp} programs.
3535

36-
http://www.llvm.org[LLVM] is a rather modern toolchain that supports the
36+
http://www.llvm.org[LLVM] is a modern toolchain that supports the
3737
compilation of C/(cpp} code (among others) to LLVM virtual machine's
3838
_bitcode_, which in turn can be compiled to each platform's native
3939
binary.
4040

41-
The plug-in includes the following tools from the LLVM toolchain:
41+
The plug-in integrates the following tools from the LLVM toolchain:
4242
Clang/Clang{plus}{plus}/llvm-gcc/llvm-g{plus}{plus} (C/(cpp} compilers), llvm-ld (linker),
4343
llvm-ar (archiver), llvm-as (assembler), llc (static compiler) and lli
4444
(JIT/Interpreter).

doc/org.eclipse.cdt.doc.user/src/llvm/initial_configuration.adoc

Lines changed: 16 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,19 @@ endif::[]
3030

3131
== Initial configuration
3232

33-
When you launch an Eclipse workspace with LLVM plug-in for the first
34-
time, you may need to set paths to LLVM binaries, headers and libraries.
35-
This is done in Eclipse by navigating to Window -> Preferences -> LLVM.
36-
Set LLVM installation folder to point where your LLVM binaries are,
37-
include directory to point where your Clang includes are and library
38-
path to the directory where your LLVM libraries reside.
39-
40-
If your paths in Preferences and LLVM are correctly set and the plug-in
41-
is able to find your LLVM binaries, you should have the option to use
42-
"LLVM with Clang (Linux/MacOSX/Windows)" toolchain and "LLVM with GCC
43-
(Linux/MacOSX/Windows) toolchain". The toolchains are available in
44-
project types of 'executable', 'static library' and 'dynamic library' in
45-
both C and {cpp}.
46-
47-
An alternative way is to set the LLVM binary path to PATH system
48-
environment variable.
49-
50-
You may also have to include the path to
51-
Standard {cpp} Library in order to compile {cpp} programs by adding the
52-
path in LLVM Preferences or appending it to LD_LIBRARY_PATH system
53-
environment variable.
33+
On Linux and macOS hosts, the LLVM toolchain will typically be installed via the package
34+
management tool provided by the Linux distribution or as part of the
35+
_Xcode Command Line Tools_ and will be located on the system `PATH`.
36+
If your LLVM toolchain is not on the system `PATH` when launching the Eclipse Workbench,
37+
you may need to add the location of your LLVM binaries to the `PATH` environment variable
38+
within Eclipse. This is done by navigating to Window -> Preferences ->
39+
C/{cpp} -> Build -> Environment. Select the `PATH` environment variable and then edit its
40+
value to point where your LLVM binaries are located.
41+
42+
If your `PATH` environment variable is set correctly, you should see the
43+
_LLVM with Clang_ and _LLVM with GCC_ toolchains available for selection within the
44+
CDT project wizard for managed build projects. The toolchains are available for both
45+
C and {cpp} projects.
46+
47+
NOTE: Clang is automatically detected when installed on a Microsoft Windows host using
48+
the MSYS2 package manager. It is not necessary to modify the `PATH`.

doc/org.eclipse.cdt.doc.user/src/llvm/llvm_specific.adoc

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,26 @@ endif::[]
3232

3333
=== Project types
3434

35-
==== [#executables]#Executables#
35+
==== Executables
3636

37-
At the moment the executables built with the default settings of a LLVM
37+
The executables built with the default settings of an LLVM
3838
with Clang project are native binaries and can be run and debugged as
39-
such. However LLVM does also support compiling programs to LLVM bitcode,
40-
which in turn can be run with lli, which is the LLVM toolchain's
41-
interpreter/JIT compiler. Unfortunately programs run with lli can not be
39+
such. However LLVM does also support building programs to LLVM bitcode,
40+
which in turn can be run with `lli`, which is the LLVM toolchain's
41+
interpreter/JIT compiler. Unfortunately programs run with `lli` can not be
4242
efficiently debugged, since the only (usable) debugging information that
4343
you can get from them is the backtrace. You can, however, compile the
44-
bitcode versions of your programs, if you will (TODO: even though
44+
bitcode versions of your programs, if you wish (TODO: even though
4545
running them from Eclipse doesn't work at the moment).
4646

47-
===== Compiling to LLVM bitcode instead of native binary
47+
===== Compiling to LLVM bitcode instead of object code
4848

49-
You can compile your programs to LLVM bitcode instead of native binaries
50-
by unchecking the "Create native binary (-native)" checkbox in your
51-
project's properties in Properties → C/{cpp} Build → Settings → LLVM
52-
Linker → General LLVM options. After this Eclipse will not give the
53-
-native flag to llvm-ld, so the product of linking is just linked
54-
bitcode files (.bc) and a Bash script file with the name of the wanted
55-
executable. The Bash script will simply run the compiled LLVM bitcode
56-
file with lli.
49+
C/{cpp} source files are compiled to native object code by default. You can compile
50+
your source files to LLVM bitcode instead of object code by checking the _Emit LLVM IR_
51+
checkbox in the Project Properties dialog on the Properties -> C/{cpp} Build ->
52+
Settings -> LLVM Clang -> Optimization page.
5753

58-
==== [#libraries]#Shared and static libraries#
54+
==== Shared and static libraries
5955

6056
The shared and static libraries generated with LLVM plugin are (TODO:
6157
for now) only LLVM bitcode files linked into one file and therefore

doc/org.eclipse.cdt.doc.user/toc_LLVM.xml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)