Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/sources/main
diff options
context:
space:
mode:
authorLeitwolf112026-11-13 01:54:38 +0300
committerLeitwolf112026-11-13 01:54:38 +0300
commit34acd40e7c520dda4addfc63ed3e26175fb399c5 (patch)
treea69fa983f7fa35603d3667ea99bb2c011043cf6c /sources/main
parentd73260a011d463f492448bc2e29aa46fba657326 (diff)
downloadtazel-feature/action-level-incremental.tar.gz
Make Windows objects reproducible so early cutoff holds therefeature/action-level-incremental
The Windows runner showed that a comment in a header recompiled both units and then archived and relinked, where Linux and macOS stopped after the compiles. Clang stamps objects for Windows targets with the time by default, and debug information there records the content of every header, so the objects always differed. - Clang gets -mno-incremental-linker-compatible for Windows targets: the same source gives the same object. - The early-cutoff part of BuildCommandTest builds in release mode, without debug information, on every system.
Diffstat (limited to 'sources/main')
-rw-r--r--sources/main/kotlin/com/progmasoft/tazel/driver/CcCommands.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/main/kotlin/com/progmasoft/tazel/driver/CcCommands.kt b/sources/main/kotlin/com/progmasoft/tazel/driver/CcCommands.kt
index b5f7cdc..e6b1fe0 100644
--- a/sources/main/kotlin/com/progmasoft/tazel/driver/CcCommands.kt
+++ b/sources/main/kotlin/com/progmasoft/tazel/driver/CcCommands.kt
@@ -110,6 +110,11 @@ class CcCommands(private val plan: BuildPlan, private val compiler: CcCompiler)
command += compiler.targetFlags
command += listOf("-c", source.toString(), "-o", objectFile.toString())
command += listOf("-MD", "-MF", depfile.toString())
+ // For Windows targets Clang stamps objects with the time by default; without the stamp the same
+ // source gives the same object, so an unchanged object stops the actions after it.
+ if (os == Os.WINDOWS && compiler.compiler == com.progmasoft.tazel.dsl.Compiler.CLANG) {
+ command += "-mno-incremental-linker-compatible"
+ }
if (cpp) {
settings.cppStandard?.let { command += "-std=" + cppStandard(it, settings.gnuExtensions) }
} else {