Doc: Describe Compiler Explorer

Fixes: QTCREATORBUG-29720
Change-Id: I1de27d01a684249cd8bd3e5e8c98a551947a4436
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Leena Miettinen
2023-10-11 13:47:08 +02:00
parent 07f2c24308
commit fe6dd868c5
7 changed files with 111 additions and 2 deletions

View File

@@ -36,6 +36,8 @@ Every language, compiler and library that is supported at https://godbolt.org
is also supported in Qt Creator. You can save your Compiler Explorer session as
a `.qtce` file (JSON-based).
([Documentation](https://doc-snapshots.qt.io/qtcreator-12.0/creator-how-to-explore-compiler-code.html))
### CMake Debugging and the Debug Adapter Protocol
Set breakpoints in a CMake file and select `DAP` and `CMake Preset` in `Debug`

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@@ -58,6 +58,7 @@
\li \l {Add libraries to projects}
\li \l {Add subprojects to projects}
\li \l {Add wizards}
\li \l {Create compiler explorer sessions}
\li \l {Create C++ classes}
\li \l {Create files}
\li \l {Create OpenGL fragment and vertex shaders}
@@ -79,6 +80,10 @@
\section1 Build and Run
\list
\li \l {Explore compiler code}
\endlist
\section2 Manage Kits
\list

View File

@@ -46,6 +46,10 @@
or list models, \QD forms and a matching classes for Qt Widgets
projects, Qt resource files, as well as QML and JavaScript files
for Qt Quick projects.
\row
\li \uicontrol {Compiler Explorer}
\li Example setup for using Compiler Explorer to compile C++ or Python
code.
\row
\li \uicontrol {GLSL}
\li OpenGL fragment and vertex shaders.
@@ -68,8 +72,9 @@
\li Empty Nim source and script files.
\endtable
\sa {Create C++ classes}, {Create OpenGL fragment and vertex shaders},
{Create resource files}, {Use project wizards}
\sa {Create compiler explorer sessions}, {Create C++ classes},
{Create OpenGL fragment and vertex shaders}, {Create resource files},
{Use project wizards}
*/
/*!

View File

@@ -0,0 +1,95 @@
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page creator-how-to-create-compiler-explorer-sessions.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-projects
\title Create compiler explorer sessions
To create a compiler explorer session for a C++ or Python project:
\list 1
\li Select \uicontrol File > \uicontrol {New File} >
\uicontrol {Compiler Explorer} > \uicontrol C++ or \uicontrol Python
> \uicontrol Choose.
\li Follow the instructions of the wizard to create an example
compiler explorer session as a JSON-based \c .qtce file and to open
it.
\endlist
\note Enable the Compiler Explorer plugin to use it.
\sa {Create files}, {Enable and disable plugins}, {Explore compiler code}
*/
/*!
\page creator-how-to-explore-compiler-code.html
\previouspage creator-how-tos.html
\ingroup creator-how-to-build
\title Explore compiler code
With the \l{https://godbolt.org/}{Compiler Explorer}, you can enter code to
explore the capabilities of your compilers and interpreters. \QC supports
all languages, compilers, and libraries that Compiler Explorer supports. You
can save your compiler explorer session as a JSON-based \c .qtce file.
\image qtcreator-compiler-explorer.webp {Python code in the compiler explorer}
\note Enable the Compiler Explorer plugin to use it.
To check how a compiler sees C++ or Python code:
\list 1
\li Select \uicontrol Tools > \uicontrol {Compiler Explorer} >
\uicontrol {Open Compiler Explorer}.
\li In the \uicontrol Language field, select the language to compile.
\li In the \uicontrol Compiler field, select a compiler to see the
assembly code.
\li Enter code to see the resulting assembly code.
\endlist
You can also see the application status and output.
To explore several compilers, select \uicontrol {Add Compiler}.
\section1 Set compiler options
Select \inlineimage icons/settings.png
to set compiler options.
\table
\header
\li Setting
\li Value
\row
\li Compiler options
\li Arguments passed to the compiler. Add options to enable optimization
and to change other aspects of the compilation.
\row
\li Libraries
\li Add the libraries that your code links against.
\row
\li Execute the code
\li Execute the resulting executable.
\row
\li Compile to binary object
\li Convert the source code to a binary executable.
\row
\li Intel asm syntax
\li Use the Intel ASM syntax for writing the assembly code.
\row
\li Demangle identifiers
\li Extract and demangle identifiers from mangled symbols.
\e {Name mangling} adds descriptive data to a function's identifier
at link time. The data indicates which namespace and object a
function belongs to and which arguments it handles in which order.
\endtable
\sa {Create compiler explorer sessions}, {Enable and disable plugins},
{Add compilers}, {Add custom compilers}
*/

View File

@@ -211,6 +211,7 @@
\li \l {Add libraries to projects}
\li \l {Add subprojects to projects}
\li \l {Add wizards}
\li \l {Create compiler explorer sessions}
\li \l {Create C++ classes}
\li \l {Create files}
\li \l {Create OpenGL fragment and vertex shaders}
@@ -233,6 +234,7 @@
\li \l {Add Nim compilers}
\li \l {Add Qt versions}
\li \l {Edit Qbs profiles}
\li \l {Explore compiler code}
\endlist
\li Read Qt Documentation
\list