| ... |
... |
@@ -159,7 +159,7 @@ data BuildConfig |
|
159
|
159
|
, withNuma :: Bool
|
|
160
|
160
|
, withZstd :: Bool
|
|
161
|
161
|
, crossTarget :: Maybe String
|
|
162
|
|
- , crossStage :: Maybe FinalCrossStage
|
|
|
162
|
+ , finalCrossStage :: Maybe FinalCrossStage
|
|
163
|
163
|
, crossEmulator :: CrossEmulator
|
|
164
|
164
|
, configureWrapper :: Maybe String
|
|
165
|
165
|
, fullyStatic :: Bool
|
| ... |
... |
@@ -229,7 +229,7 @@ vanilla = BuildConfig |
|
229
|
229
|
, withNuma = False
|
|
230
|
230
|
, withZstd = False
|
|
231
|
231
|
, crossTarget = Nothing
|
|
232
|
|
- , crossStage = Nothing
|
|
|
232
|
+ , finalCrossStage = Nothing
|
|
233
|
233
|
, crossEmulator = NoEmulator
|
|
234
|
234
|
, configureWrapper = Nothing
|
|
235
|
235
|
, fullyStatic = False
|
| ... |
... |
@@ -275,7 +275,7 @@ static = vanilla { fullyStatic = True } |
|
275
|
275
|
staticNativeInt :: BuildConfig
|
|
276
|
276
|
staticNativeInt = static { bignumBackend = Native }
|
|
277
|
277
|
|
|
278
|
|
--- | The final stage for which binary distrubutions should be built
|
|
|
278
|
+-- | The final stage for which binary distributions should be built
|
|
279
|
279
|
--
|
|
280
|
280
|
-- `Stage2` builds a cross-compiler (build == host, host /= target). `Stage3`
|
|
281
|
281
|
-- implies `Stage2` and additionally builds a cross-compiled compiler (build /=
|
| ... |
... |
@@ -294,7 +294,7 @@ crossConfig :: String -- ^ target triple |
|
294
|
294
|
-> BuildConfig
|
|
295
|
295
|
crossConfig triple emulator configure_wrapper crossStage =
|
|
296
|
296
|
vanilla { crossTarget = Just triple
|
|
297
|
|
- , crossStage = Just crossStage
|
|
|
297
|
+ , finalCrossStage = Just crossStage
|
|
298
|
298
|
, crossEmulator = emulator
|
|
299
|
299
|
, configureWrapper = configure_wrapper
|
|
300
|
300
|
}
|
| ... |
... |
@@ -370,8 +370,7 @@ binDistName :: Arch -> Opsys -> BuildConfig -> String |
|
370
|
370
|
binDistName arch opsys bc = "ghc-" ++ testEnv arch opsys bc
|
|
371
|
371
|
|
|
372
|
372
|
-- | The bindist name for the stage3 (target) artifact produced by a combined
|
|
373
|
|
--- cross job (crossStage == Just 3). This preserves the naming convention
|
|
374
|
|
--- expected by downstream consumers.
|
|
|
373
|
+-- cross job (crossStage == Just 3).
|
|
375
|
374
|
binDistNameStage3 :: Arch -> Opsys -> BuildConfig -> String
|
|
376
|
375
|
binDistNameStage3 arch opsys bc = "ghc-" ++ intercalate "-" (concat
|
|
377
|
376
|
[ [ archName arch, opsysName opsys ]
|
| ... |
... |
@@ -907,7 +906,7 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} } |
|
907
|
906
|
[ opsysVariables arch opsys
|
|
908
|
907
|
, "TEST_ENV" =: testEnv arch opsys buildConfig
|
|
909
|
908
|
, "BIN_DIST_NAME" =: binDistName arch opsys buildConfig
|
|
910
|
|
- , if crossStage buildConfig == Just Stage3
|
|
|
909
|
+ , if finalCrossStage buildConfig == Just Stage3
|
|
911
|
910
|
then "BIN_DIST_NAME_STAGE3" =: binDistNameStage3 arch opsys buildConfig
|
|
912
|
911
|
else mempty
|
|
913
|
912
|
, "BUILD_FLAVOUR" =: flavourString jobFlavour
|
| ... |
... |
@@ -916,7 +915,7 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} } |
|
916
|
915
|
, "INSTALL_CONFIGURE_ARGS" =: "--enable-strict-ghc-toolchain-check"
|
|
917
|
916
|
, maybe mempty ("CONFIGURE_WRAPPER" =:) (configureWrapper buildConfig)
|
|
918
|
917
|
, maybe mempty ("CROSS_TARGET" =:) (crossTarget buildConfig)
|
|
919
|
|
- , maybe mempty (("CROSS_STAGE" =:) . show . crossStageToInt) (crossStage buildConfig)
|
|
|
918
|
+ , maybe mempty (("FINAL_CROSS_STAGE" =:) . show . crossStageToInt) (finalCrossStage buildConfig)
|
|
920
|
919
|
, case crossEmulator buildConfig of
|
|
921
|
920
|
NoEmulator
|
|
922
|
921
|
-- we need an emulator but it isn't set. Won't run the testsuite
|
| ... |
... |
@@ -950,7 +949,7 @@ job arch opsys buildConfig = NamedJob { name = jobName, jobInfo = Job {..} } |
|
950
|
949
|
trim = dropWhileEnd isSpace . dropWhile isSpace
|
|
951
|
950
|
|
|
952
|
951
|
stage3Artifacts
|
|
953
|
|
- | crossStage buildConfig == Just Stage3 =
|
|
|
952
|
+ | finalCrossStage buildConfig == Just Stage3 =
|
|
954
|
953
|
[binDistNameStage3 arch opsys buildConfig ++ ".tar.xz"]
|
|
955
|
954
|
| otherwise = []
|
|
956
|
955
|
|
| ... |
... |
@@ -1323,7 +1322,8 @@ cross_jobs = [ |
|
1323
|
1322
|
-- x86 -> aarch64
|
|
1324
|
1323
|
validateBuilds Amd64 (Linux Debian13) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing Stage2)
|
|
1325
|
1324
|
|
|
1326
|
|
- -- x86_64 (build) -> riscv64 (host/target)
|
|
|
1325
|
+ -- Stage2: x86_64 (build/host) -> riscv64 (target)
|
|
|
1326
|
+ -- Stage3: x86_64 (build) -> riscv64 (host/target)
|
|
1327
|
1327
|
, addValidateRule RiscV (validateBuilds Amd64 (Linux Debian13Riscv) (crossConfig "riscv64-linux-gnu" (Emulator "qemu-riscv64 -L /usr/riscv64-linux-gnu") Nothing Stage3))
|
|
1328
|
1328
|
|
|
1329
|
1329
|
-- x86_64 -> loongarch64
|