Sven Tennie pushed to branch wip/supersven/hadrian-cross-stage3 at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • .gitlab/generate-ci/gen_ci.hs
    ... ... @@ -383,7 +383,7 @@ testEnv arch opsys bc =
    383 383
         , ["no_tntc"  | not (tablesNextToCode bc) ]
    
    384 384
         , ["cross_"++triple  | Just triple <- pure $ crossTarget bc ]
    
    385 385
         -- TODO: Is there something better than `show` for this?
    
    386
    -    , ["stage_" ++ show stage | Just stage <- pure (crossStage bc), Just triple <- pure (crossTarget bc), "riscv" `isInfixOf` triple ]
    
    386
    +    , ["stage" ++ show stage | Just stage <- pure (crossStage bc), Just triple <- pure (crossTarget bc), "riscv" `isInfixOf` triple ]
    
    387 387
         , [flavourString (mkJobFlavour bc)]
    
    388 388
         ]
    
    389 389
     
    

  • .gitlab/jobs.yaml
    ... ... @@ -2442,7 +2442,7 @@
    2442 2442
           "XZ_OPT": "-9"
    
    2443 2443
         }
    
    2444 2444
       },
    
    2445
    -  "nightly-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate": {
    
    2445
    +  "nightly-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate": {
    
    2446 2446
         "after_script": [
    
    2447 2447
           ".gitlab/ci.sh save_cache",
    
    2448 2448
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -2453,7 +2453,7 @@
    2453 2453
         "artifacts": {
    
    2454 2454
           "expire_in": "8 weeks",
    
    2455 2455
           "paths": [
    
    2456
    -        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate.tar.xz",
    
    2456
    +        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate.tar.xz",
    
    2457 2457
             "junit.xml",
    
    2458 2458
             "unexpected-test-output.tar.gz"
    
    2459 2459
           ],
    
    ... ... @@ -2496,7 +2496,7 @@
    2496 2496
         ],
    
    2497 2497
         "variables": {
    
    2498 2498
           "BIGNUM_BACKEND": "gmp",
    
    2499
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate",
    
    2499
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate",
    
    2500 2500
           "BUILD_FLAVOUR": "validate",
    
    2501 2501
           "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
    
    2502 2502
           "CROSS_EMULATOR": "qemu-riscv64 -L /usr/riscv64-linux-gnu",
    
    ... ... @@ -2504,11 +2504,11 @@
    2504 2504
           "CROSS_TARGET": "riscv64-linux-gnu",
    
    2505 2505
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    2506 2506
           "RUNTEST_ARGS": "-e config.timeout=900",
    
    2507
    -      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate",
    
    2507
    +      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate",
    
    2508 2508
           "XZ_OPT": "-9"
    
    2509 2509
         }
    
    2510 2510
       },
    
    2511
    -  "nightly-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate": {
    
    2511
    +  "nightly-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate": {
    
    2512 2512
         "after_script": [
    
    2513 2513
           ".gitlab/ci.sh save_cache",
    
    2514 2514
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -2519,7 +2519,7 @@
    2519 2519
         "artifacts": {
    
    2520 2520
           "expire_in": "8 weeks",
    
    2521 2521
           "paths": [
    
    2522
    -        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate.tar.xz",
    
    2522
    +        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate.tar.xz",
    
    2523 2523
             "junit.xml",
    
    2524 2524
             "unexpected-test-output.tar.gz"
    
    2525 2525
           ],
    
    ... ... @@ -2562,7 +2562,7 @@
    2562 2562
         ],
    
    2563 2563
         "variables": {
    
    2564 2564
           "BIGNUM_BACKEND": "gmp",
    
    2565
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate",
    
    2565
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate",
    
    2566 2566
           "BUILD_FLAVOUR": "validate",
    
    2567 2567
           "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
    
    2568 2568
           "CROSS_EMULATOR": "qemu-riscv64 -L /usr/riscv64-linux-gnu",
    
    ... ... @@ -2570,7 +2570,7 @@
    2570 2570
           "CROSS_TARGET": "riscv64-linux-gnu",
    
    2571 2571
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    2572 2572
           "RUNTEST_ARGS": "-e config.timeout=900",
    
    2573
    -      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate",
    
    2573
    +      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate",
    
    2574 2574
           "XZ_OPT": "-9"
    
    2575 2575
         }
    
    2576 2576
       },
    
    ... ... @@ -6676,7 +6676,7 @@
    6676 6676
           "TEST_ENV": "x86_64-linux-deb12-release"
    
    6677 6677
         }
    
    6678 6678
       },
    
    6679
    -  "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate": {
    
    6679
    +  "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate": {
    
    6680 6680
         "after_script": [
    
    6681 6681
           ".gitlab/ci.sh save_cache",
    
    6682 6682
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -6687,7 +6687,7 @@
    6687 6687
         "artifacts": {
    
    6688 6688
           "expire_in": "2 weeks",
    
    6689 6689
           "paths": [
    
    6690
    -        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate.tar.xz",
    
    6690
    +        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate.tar.xz",
    
    6691 6691
             "junit.xml",
    
    6692 6692
             "unexpected-test-output.tar.gz"
    
    6693 6693
           ],
    
    ... ... @@ -6713,7 +6713,7 @@
    6713 6713
         ],
    
    6714 6714
         "rules": [
    
    6715 6715
           {
    
    6716
    -        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*RISC-V.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    6716
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*RISC-V.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    6717 6717
             "when": "on_success"
    
    6718 6718
           }
    
    6719 6719
         ],
    
    ... ... @@ -6730,7 +6730,7 @@
    6730 6730
         ],
    
    6731 6731
         "variables": {
    
    6732 6732
           "BIGNUM_BACKEND": "gmp",
    
    6733
    -      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate",
    
    6733
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate",
    
    6734 6734
           "BUILD_FLAVOUR": "validate",
    
    6735 6735
           "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
    
    6736 6736
           "CROSS_EMULATOR": "qemu-riscv64 -L /usr/riscv64-linux-gnu",
    
    ... ... @@ -6738,10 +6738,10 @@
    6738 6738
           "CROSS_TARGET": "riscv64-linux-gnu",
    
    6739 6739
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    6740 6740
           "RUNTEST_ARGS": "-e config.timeout=900",
    
    6741
    -      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_2-validate"
    
    6741
    +      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage2-validate"
    
    6742 6742
         }
    
    6743 6743
       },
    
    6744
    -  "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate": {
    
    6744
    +  "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate": {
    
    6745 6745
         "after_script": [
    
    6746 6746
           ".gitlab/ci.sh save_cache",
    
    6747 6747
           ".gitlab/ci.sh save_test_output",
    
    ... ... @@ -6752,7 +6752,7 @@
    6752 6752
         "artifacts": {
    
    6753 6753
           "expire_in": "2 weeks",
    
    6754 6754
           "paths": [
    
    6755
    -        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate.tar.xz",
    
    6755
    +        "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate.tar.xz",
    
    6756 6756
             "junit.xml",
    
    6757 6757
             "unexpected-test-output.tar.gz"
    
    6758 6758
           ],
    
    ... ... @@ -6778,7 +6778,7 @@
    6778 6778
         ],
    
    6779 6779
         "rules": [
    
    6780 6780
           {
    
    6781
    -        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*RISC-V.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    6781
    +        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bx86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/)) || ($CI_MERGE_REQUEST_LABELS =~ /.*RISC-V.*/)))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
    
    6782 6782
             "when": "on_success"
    
    6783 6783
           }
    
    6784 6784
         ],
    
    ... ... @@ -6795,7 +6795,7 @@
    6795 6795
         ],
    
    6796 6796
         "variables": {
    
    6797 6797
           "BIGNUM_BACKEND": "gmp",
    
    6798
    -      "BIN_DIST_NAME": "stage3-ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-validate",
    
    6798
    +      "BIN_DIST_NAME": "ghc-x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate",
    
    6799 6799
           "BUILD_FLAVOUR": "validate",
    
    6800 6800
           "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
    
    6801 6801
           "CROSS_EMULATOR": "qemu-riscv64 -L /usr/riscv64-linux-gnu",
    
    ... ... @@ -6803,7 +6803,7 @@
    6803 6803
           "CROSS_TARGET": "riscv64-linux-gnu",
    
    6804 6804
           "INSTALL_CONFIGURE_ARGS": "--enable-strict-ghc-toolchain-check",
    
    6805 6805
           "RUNTEST_ARGS": "-e config.timeout=900",
    
    6806
    -      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage_3-validate"
    
    6806
    +      "TEST_ENV": "x86_64-linux-deb12-riscv-cross_riscv64-linux-gnu-stage3-validate"
    
    6807 6807
         }
    
    6808 6808
       },
    
    6809 6809
       "x86_64-linux-deb12-unreg-validate": {
    

  • hadrian/src/Rules/BinaryDist.hs
    ... ... @@ -123,7 +123,7 @@ installTo relocatable prefix = do
    123 123
     
    
    124 124
     
    
    125 125
     buildBinDistDir :: FilePath -> FilePath -> BindistConfig -> Action ()
    
    126
    -buildBinDistDir dirPrefix root conf@BindistConfig{..} = do
    
    126
    +buildBinDistDir dirSuffix root conf@BindistConfig{..} = do
    
    127 127
     
    
    128 128
         verbosity <- getVerbosity
    
    129 129
         -- We 'need' all binaries and libraries
    
    ... ... @@ -153,7 +153,7 @@ buildBinDistDir dirPrefix root conf@BindistConfig{..} = do
    153 153
         distDir        <- Context.distDir (vanillaContext library_stage rts)
    
    154 154
     
    
    155 155
         let ghcBuildDir      = root -/- stageString library_stage
    
    156
    -        bindistFilesDir  = root -/- "bindist" -/- dirPrefix <> ghcVersionPretty
    
    156
    +        bindistFilesDir  = root -/- "bindist" -/- ghcVersionPretty <> dirSuffix
    
    157 157
             ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform
    
    158 158
             rtsIncludeDir    = distDir -/- "include"
    
    159 159
     
    
    ... ... @@ -326,7 +326,7 @@ bindistRules = do
    326 326
     
    
    327 327
         phony "binary-dist-dir-cross" $ buildBinDistDir "" root crossBindist
    
    328 328
     
    
    329
    -    phony "binary-dist-dir-stage3" $ buildBinDistDir "stage3-" root targetBindist
    
    329
    +    phony "binary-dist-dir-stage3" $ buildBinDistDir "-stage3" root targetBindist
    
    330 330
     
    
    331 331
         let buildBinDist compressor = do
    
    332 332
               win_host <- isWinHost
    
    ... ... @@ -336,13 +336,13 @@ bindistRules = do
    336 336
             buildBinDistReloc = buildBinDistX "reloc-binary-dist-dir" "reloc-bindist" ""
    
    337 337
     
    
    338 338
             buildBinDistX :: String -> FilePath -> FilePath -> Compressor -> Action ()
    
    339
    -        buildBinDistX target bindist_folder dirPrefix compressor = do
    
    339
    +        buildBinDistX target bindist_folder dirSuffix compressor = do
    
    340 340
                 need [target]
    
    341 341
     
    
    342 342
                 version        <- setting ProjectVersion
    
    343 343
                 targetPlatform <- setting TargetPlatformFull
    
    344 344
     
    
    345
    -            let ghcVersionPretty = dirPrefix <> "ghc-" ++ version ++ "-" ++ targetPlatform
    
    345
    +            let ghcVersionPretty = "ghc-" ++ version ++ "-" ++ targetPlatform <> dirSuffix
    
    346 346
     
    
    347 347
                 -- Finally, we create the archive <root>/bindist/ghc-X.Y.Z-platform.tar.xz
    
    348 348
                 tarPath <- builderPath (Tar Create)
    
    ... ... @@ -359,7 +359,7 @@ bindistRules = do
    359 359
     
    
    360 360
         -- TODO: Generate these targets as well
    
    361 361
         phony "binary-dist-cross" $ buildBinDistX "binary-dist-dir-cross" "bindist" "" Xz
    
    362
    -    phony "binary-dist-stage3" $ buildBinDistX "binary-dist-dir-stage3" "bindist" "stage3-" Xz
    
    362
    +    phony "binary-dist-stage3" $ buildBinDistX "binary-dist-dir-stage3" "bindist" "-stage3" Xz
    
    363 363
     
    
    364 364
         -- Prepare binary distribution configure script
    
    365 365
         -- (generated under <ghc root>/distrib/configure by 'autoreconf')