Skip to content

Commit 7e0d80b

Browse files
authored
Merge pull request #40866 from github/repo-sync
Repo sync
2 parents 461e367 + b554742 commit 7e0d80b

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,22 @@ If you added manual build steps for compiled languages and {% data variables.pro
267267

268268
When you enable default setup for a repository that contains C/C++ code, the build mode is set to `none` automatically.
269269

270-
>[!NOTE] Support of build mode `none` for C/C++ codebases is currently in {% data variables.release-phases.public_preview %} and subject to change.
270+
### No build for C/C++
271+
272+
{% data variables.product.prodname_codeql %} will infer C/C++ compilation units through source file extensions. For each source file found, compilation flags and include paths are inferred by inspecting the codebase without the need for a working build command.
273+
274+
#### Accuracy of no build analysis for C/C++
275+
276+
Creating a {% data variables.product.prodname_codeql %} C/C++ database without a build may produce less accurate results than using `autobuild` or manual build steps in some cases; for example, if:
277+
278+
* The code depends heavily on custom macros/defines not available in existing headers
279+
* The codebase has many external dependencies
280+
281+
You can ensure a more accurate analysis by taking the following steps:
282+
283+
* Place custom macros and defines in header files that are included in relevant source files
284+
* Ensure external dependencies (headers) are available in system include directories or in the workspace
285+
* Run the extraction on the target platform. For example, choose a Windows runner to analyze Windows projects to give access to platform specific headers and compilers
271286

272287
{% endif %}
273288

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
# Reference: #16543 (C/C++ public preview)
1+
# Reference: #19520 (C/C++ GA)
22

33
versions:
44
fpt: '*'
55
ghec: '*'
6+
ghes: '>= 3.20'

0 commit comments

Comments
 (0)