| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Executables that don't export a public API should not emit a
swiftmodule, but the swift modulename is observable from within the
program, so we should still set the module name on executable builds.
Fixes: #25710
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
a7424b636b Ninja: make the collator rule use `restat = 1`
e24eecfc33 Tests/CXXModules: add a test to ensure that `restat` works for collation
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9259
|
| |
| |
| |
| | |
This avoids rebuilds when the module metadata does not change.
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
60a8736378 cmNinjaTargetGenerator: scanning depends on the module metadata
52036ce090 Tests/CXXModules: test that objects depend on dependent modules json files
9a45c9fbd5 cmNinjaTargetGenerator: use `emplace_back` for scanning deps
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9247
|
| |
| |
| |
| | |
Fixes: #25531
|
| | |
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
363300ace5 cxxmodules: depend on the modmap contents
940628d48d Tests/CXXModules: test that objects depend on their modmap files
681ee92030 Tests/CXXModules: support testing rebuild conditions
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9248
|
| |
| |
| |
| |
| |
| |
| | |
If the modmap changes, we need to recompile. It is not just a file that
needs to exist to compile.
Fixes: #25511
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
9950a69f26 Swift/Ninja: Fix compile commands output file path
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9150
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The exported compile commands did not use the proper file path separator
for Windows in the output field for Swift files. This patch adds the
appropriate filepath fix-ups to the output-field.
Fixes: #25580
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
b767917ebb Swift/Ninja: Include sources in response file
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9143
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Unlike C/C++, Swift compiles all sources in a module at once. This can
quickly overwhelm the commandline length limit on Windows, so it is
useful to place the source files in the response file.
Issue: #25572
|
|/ /
| |
| |
| |
| |
| |
| | |
The `-static` is important for the emission of the module as it is
serialized into the swiftmodule which then is used by the Swift frontend
to decide how to link to the symbol (via the GOT or not, or the IAT on
Windows). This repairs building static libraries with Swift on Windows.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
a6a5c43300 Swift/Ninja: Add support for response files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !9098
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adding support for `CMAKE_NINJA_FORCE_RESPONSE_FILE` with Swift.
Issue: #25490
Fixes: #25563
|
|\ \ \
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
de3dc16b64 cmNinjaTargetGenerator: use `.` for the needed phony order-only dependency
1aa28f3b92 cmNinjaTargetGenerator: ensure that the object output directory exists
4a9613ff9b cmNinjaTargetGenerator: add a method to compute the object directory
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9105
|
| | |
| | |
| | |
| | | |
It is only required for Ninja < 1.7 though.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If a target has no object compilations within it, nothing ensures that
the directory exists yet it is still mentioned as an order-only
dependency within the build files. While `ninja` is OK with this,
`samu`, an alternate `ninja` implementation, is not. Make sure the
directory always exists for consistency.
Fixes: #25526
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
1161ad76ac Swift/Ninja: Always restat swift build commands
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !9076
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The swift toolchain leaves output files untouched
if there are no meaningful input changes; without
restat, this causes ninja to needlessly rebuild
targets that are not actually out-of-date
Fixes: #25496
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | | |
Swift compile commands need to have all source files in the module
specified in the compile command or LSP systems will report errors on
missing types that are defined in other source files in the same module.
Issue: #25491
|
|\ \ \
| | |/
| |/|
| | |
| | |
| | |
| | | |
cxxmodules-no-compile-commands-modmap
* cxxmodules-no-compile-commands-modmap-release:
cmNinjaTargetGenerator: use scan flag for modmap usage in exported commands
|
| | |
| | |
| | |
| | | |
See: https://discourse.cmake.org/t/how-to-control-the-location-of-the-c-20-binary-module-interface-bmi-output-directory/7968
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
The CMP0157 old behavior omitted the output-file-map after the Swift
build split because we stopped calling `EmitSwiftDependencyInfo` when we
could not split the build because we didn't call
`WriteObjectBuildStatement`. If we can't split the build, then we still
need to include the OFM information to not break incremental builds.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
9bed4f4d81 Swift/Ninja: Split compilation model
64b3367845 cmGlobalGenerator: Allow passing language to GetLangaugeOutputExtension
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8907
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Splitting the Swift build into an object build and a separate link step,
instead of building and linking in one step. The immediate benefit is
LSP support because we are able to emit compile-commands for Swift files
now. Additionally, it is possible to specify flags to the compile step,
enabling folks to emit C and C++ headers from their Swift builds for
C/C++ interop, without needing custom commands. Eventually, this gives
us a path toward working object libraries.
Object Libraries:
- Object libraries don't work today because CMake doesn't emit targets
for object libraries into the Ninja build file.
- tl;dr: Object libraries work if they aren't WMO. Still need work to
make WMO'd object libraries work.
Object libraries still don't completely work with this patch because,
while we emit the targets, the `TARGET_OBJECTS` generator expression
expansion has a separate mechanism for determining what the names of
the objects are based on the input source files, so targets that
depend on an object library built with a whole-module optimization
will depend on objects based on the name of the source file instead
of the actual emitted object file.
These features require being able to accurately model wholemodule builds
though, because we actually need to track object files and WMO affects
what objects are emitted. For that, we require CMP0157 use the NEW
policy. When it's OLD, we have to fall back on the old behavior and
cannot provide object libraries or the compile-commands for LSP.
Issue: #25308
|
|\ \ \
| |/ /
|/| /
| |/
| |
| |
| |
| |
| |
| | |
40dc13b242 cmNinjaTargetGenerator: PCH files do not need dyndep
f61c64cd1c cmLocalGenerator: prevent scanning of PCH source files
ea8c37b759 Tests/CXXModules: add a test which scans a PCH-using source
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !9032
|
| |
| |
| |
| | |
Fixes: #24209
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
beb1393f8f Merge branch 'revert-exact-collation-depends-3.27' into fortran-objects-as-sources-fix
a033dce326 Makefiles: provide, but do not consume, "forward linked" target dirs
7cd0adab1b cmCommonTargetGenerator: use modules from linked object-referenced targets
1175f1c874 LinkItem: track `cmSourceFile` instances for external objects
d2fa56772f Ninja: support "forwarding" modules from other targets
ec1e589bec Ninja: Revert exact collation dependencies for 3.27
06df59b930 cmCommonTargetGenerator: return forward linked target dirs too
f8729ab366 cmLocalUnixMakefileGenerator3: handle object-referencing Fortran modules
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8989
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a target uses objects from another target which provides modules as
sources, the modules provided by the referenced target must also be
treated as if they were provided by the referencing target. Add the
concept of "forwarding" modules so that consumers can use modules
created by these sources as well.
Note that this is only sensible for Fortran where module usages are
implicit as far as CMake's visibility model is concerned. C++ modules
have their own concept of visibility which does not require or support
such `$<TARGET_OBJECTS>` reuse in this way.
|
| |
| |
| |
| |
| | |
This will be used for module forwarding in order to support
`$<TARGET_OBJECTS>` usage in source and link libraries calls.
|
| |
| |
| |
| |
| |
| | |
Targets only using Fortran modules via `$<TARGET_OBJECTS>` also need a
collation step to be performed. Check for this case and trigger the
collation rule to be added and used.
|
|\ \
| |/
| |
| |
| |
| |
| |
| | |
09c962a6a4 Tests/CXXModules: test forced rsp files with ninja
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8926
|
| |
| |
| |
| | |
Fixes: #25367
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
ed45432571 cmNinjaTargetGenerator: do not order-depend on C++ module sources
0973cd6702 cmNinjaTargetGenerator: use the file set visibility API
4625170925 cmFileSet: add a query for includeable file set types
51f9d9f0a2 cmNinjaTargetGenerator: avoid traversing old outputs repeatedly
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8902
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
C++ module sources should not be included by any other TUs, so their
presence cannot matter for order-only dependencies of the entire target.
Exclude them.
Update CMP0154 to take this into consideration and add tests to the
`CXXModules` suite (which already deals with module support detection).
|
| | |
|
| |
| |
| |
| |
| | |
We actually only need to look at outputs just added to the vector, not
all outputs that have been detected so far.
|
|/
|
|
|
|
|
| |
Previously the Ninja target generator did not set the TARGET_COMPILE_PDB
before writing a compiler command to `compile_commands.json`.
Fixes: #25214
|
|
|
|
|
|
| |
With CMP0155, filesets with only non-compiled sources do not go through
the collation path that detects it. Detect it explicitly like the Visual
Studio generator does.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This requires knowing when a generated header is public, which we can
model using file sets. Add policy CMP0154 to treat generated sources
as private by default in targets with file sets. Generated public
headers can be specified in public file sets.
Fixes: #24959
Issue: #15555
|
|
|
|
|
|
| |
Since commit 2583eff6fe (ninja: Factor out custom command order-only
depends, 2014-03-10, v3.1.0-rc1~559^2) we can store the list of custom
commands in a local variable rather than a member.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
d58253d155 clang-tidy: fix `performance-faster-string-find` lints
a19ec77200 clang-tidy: fix `readability-static-accessed-through-instance` lints
3d03629f20 cmWIXRichTextFormatWriter: remove identity cast
1df29567ac clang-tidy: fix `modernize-use-equals-default` lints
32fe862b8c clang-tidy: fix `readability-container-size-empty` lints
7eaab9a957 clang-tidy: fix `modernize-raw-string-literal` lints
ffa49c23aa clang-tidy: fix `readability-else-after-return` lints
4489e9a85c clang-tidy: fix `modernize-use-auto` lints
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8668
|
| | |
|
|/
|
|
|
|
| |
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library. Update includes
to satisfy IWYU for our CI job under Debian 12.
|
|
|
|
| |
Fixes: #24618
|
|
|
|
|
| |
There's no backing implementation for header units anyways, so just
remove it for now.
|