Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
a1567efd
by Sylvain Henry at 2025-09-01T23:01:35-04:00
4 changed files:
Changes:
| ... | ... | @@ -287,15 +287,6 @@ ghcInternalArgs = package ghcInternal ? do |
| 287 | 287 | -- | RTS-specific command line arguments.
|
| 288 | 288 | rtsPackageArgs :: Args
|
| 289 | 289 | rtsPackageArgs = package rts ? do
|
| 290 | - projectVersion <- getSetting ProjectVersion
|
|
| 291 | - buildPlatform <- queryBuild targetPlatformTriple
|
|
| 292 | - buildArch <- queryBuild queryArch
|
|
| 293 | - buildOs <- queryBuild queryOS
|
|
| 294 | - buildVendor <- queryBuild queryVendor
|
|
| 295 | - targetPlatform <- queryTarget targetPlatformTriple
|
|
| 296 | - targetArch <- queryTarget queryArch
|
|
| 297 | - targetOs <- queryTarget queryOS
|
|
| 298 | - targetVendor <- queryTarget queryVendor
|
|
| 299 | 290 | ghcUnreg <- queryTarget tgtUnregisterised
|
| 300 | 291 | ghcEnableTNC <- queryTarget tgtTablesNextToCode
|
| 301 | 292 | rtsWays <- getRtsWays
|
| ... | ... | @@ -363,25 +354,11 @@ rtsPackageArgs = package rts ? do |
| 363 | 354 | |
| 364 | 355 | , inputs ["**/RtsMessages.c", "**/Trace.c"] ?
|
| 365 | 356 | pure
|
| 366 | - ["-DProjectVersion=" ++ show projectVersion
|
|
| 367 | - , "-DRtsWay=\"rts_" ++ show way ++ "\""
|
|
| 357 | + [ "-DRtsWay=\"rts_" ++ show way ++ "\""
|
|
| 368 | 358 | ]
|
| 369 | 359 | |
| 370 | 360 | , input "**/RtsUtils.c" ? pure
|
| 371 | - [ "-DProjectVersion=" ++ show projectVersion
|
|
| 372 | - -- the RTS' host is the compiler's target (the target should be
|
|
| 373 | - -- per stage ideally...)
|
|
| 374 | - , "-DHostPlatform=" ++ show targetPlatform
|
|
| 375 | - , "-DHostArch=" ++ show targetArch
|
|
| 376 | - , "-DHostOS=" ++ show targetOs
|
|
| 377 | - , "-DHostVendor=" ++ show targetVendor
|
|
| 378 | - , "-DBuildPlatform=" ++ show buildPlatform
|
|
| 379 | - , "-DBuildArch=" ++ show buildArch
|
|
| 380 | - , "-DBuildOS=" ++ show buildOs
|
|
| 381 | - , "-DBuildVendor=" ++ show buildVendor
|
|
| 382 | - , "-DGhcUnregisterised=" ++ show (yesNo ghcUnreg)
|
|
| 383 | - , "-DTablesNextToCode=" ++ show (yesNo ghcEnableTNC)
|
|
| 384 | - , "-DRtsWay=\"rts_" ++ show way ++ "\""
|
|
| 361 | + [ "-DRtsWay=\"rts_" ++ show way ++ "\""
|
|
| 385 | 362 | ]
|
| 386 | 363 | |
| 387 | 364 | -- We're after pure performance here. So make sure fast math and
|
| ... | ... | @@ -9,6 +9,7 @@ |
| 9 | 9 | #include "rts/PosixSource.h"
|
| 10 | 10 | #include "Rts.h"
|
| 11 | 11 | #include "RtsUtils.h"
|
| 12 | +#include "ghcversion.h"
|
|
| 12 | 13 | |
| 13 | 14 | #include "eventlog/EventLog.h"
|
| 14 | 15 | |
| ... | ... | @@ -177,7 +178,7 @@ rtsFatalInternalErrorFn(const char *s, va_list ap) |
| 177 | 178 | libdwFree(session);
|
| 178 | 179 | #endif
|
| 179 | 180 | fprintf(stderr, "\n");
|
| 180 | - fprintf(stderr, " (GHC version %s for %s)\n", ProjectVersion, xstr(HostPlatform_TYPE));
|
|
| 181 | + fprintf(stderr, " (GHC version %s for %s)\n", __GLASGOW_HASKELL_FULL_VERSION__, xstr(HostPlatform_TYPE));
|
|
| 181 | 182 | fprintf(stderr, " Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug\n");
|
| 182 | 183 | fflush(stderr);
|
| 183 | 184 | }
|
| ... | ... | @@ -9,6 +9,8 @@ |
| 9 | 9 | #include "rts/PosixSource.h"
|
| 10 | 10 | #include "Rts.h"
|
| 11 | 11 | #include "RtsAPI.h"
|
| 12 | +#include "ghcplatform.h"
|
|
| 13 | +#include "ghcversion.h"
|
|
| 12 | 14 | |
| 13 | 15 | #include "RtsUtils.h"
|
| 14 | 16 | #include "Ticky.h"
|
| ... | ... | @@ -369,20 +371,28 @@ void printRtsInfo(const RtsConfig rts_config) { |
| 369 | 371 | /* The first entry is just a hack to make it easy to get the
|
| 370 | 372 | * commas right */
|
| 371 | 373 | printf(" [(\"GHC RTS\", \"YES\")\n");
|
| 372 | - mkRtsInfoPair("GHC version", ProjectVersion);
|
|
| 374 | + mkRtsInfoPair("GHC version", __GLASGOW_HASKELL_FULL_VERSION__);
|
|
| 373 | 375 | mkRtsInfoPair("RTS way", RtsWay);
|
| 374 | - mkRtsInfoPair("Host platform", HostPlatform);
|
|
| 375 | - mkRtsInfoPair("Host architecture", HostArch);
|
|
| 376 | - mkRtsInfoPair("Host OS", HostOS);
|
|
| 377 | - mkRtsInfoPair("Host vendor", HostVendor);
|
|
| 376 | + mkRtsInfoPair("Host platform", HOST_ARCH "-" HOST_VENDOR "-" HOST_OS);
|
|
| 377 | + mkRtsInfoPair("Host architecture", HOST_ARCH);
|
|
| 378 | + mkRtsInfoPair("Host OS", HOST_OS);
|
|
| 379 | + mkRtsInfoPair("Host vendor", HOST_VENDOR);
|
|
| 378 | 380 | mkRtsInfoPair("Word size", TOSTRING(WORD_SIZE_IN_BITS));
|
| 379 | 381 | // TODO(@Ericson2314) This is a joint property of the RTS and generated
|
| 380 | 382 | // code. The compiler will soon be multi-target so it doesn't make sense to
|
| 381 | 383 | // say the target is <ABI adj>, unless we are talking about the host
|
| 382 | 384 | // platform of the compiler / ABI used by a compiler plugin. This is *not*
|
| 383 | 385 | // that, so I think a rename is in order to avoid confusion.
|
| 384 | - mkRtsInfoPair("Compiler unregisterised", GhcUnregisterised);
|
|
| 385 | - mkRtsInfoPair("Tables next to code", TablesNextToCode);
|
|
| 386 | +#if defined(UnregisterisedCompiler)
|
|
| 387 | + mkRtsInfoPair("Compiler unregisterised", "YES");
|
|
| 388 | +#else
|
|
| 389 | + mkRtsInfoPair("Compiler unregisterised", "NO");
|
|
| 390 | +#endif
|
|
| 391 | +#if defined(TABLES_NEXT_TO_CODE)
|
|
| 392 | + mkRtsInfoPair("Tables next to code", "YES");
|
|
| 393 | +#else
|
|
| 394 | + mkRtsInfoPair("Tables next to code", "NO");
|
|
| 395 | +#endif
|
|
| 386 | 396 | mkRtsInfoPair("Flag -with-rtsopts", /* See #15261 */
|
| 387 | 397 | rts_config.rts_opts != NULL ? rts_config.rts_opts : "");
|
| 388 | 398 | selectIOManager(); /* resolve the io-manager, accounting for flags */
|
| ... | ... | @@ -8,6 +8,7 @@ |
| 8 | 8 | |
| 9 | 9 | // external headers
|
| 10 | 10 | #include "Rts.h"
|
| 11 | +#include "ghcversion.h"
|
|
| 11 | 12 | |
| 12 | 13 | // internal headers
|
| 13 | 14 | #include "Trace.h"
|
| ... | ... | @@ -503,7 +504,7 @@ void traceOSProcessInfo_(void) { |
| 503 | 504 | #endif
|
| 504 | 505 | {
|
| 505 | 506 | char buf[256];
|
| 506 | - snprintf(buf, sizeof(buf), "GHC-%s %s", ProjectVersion, RtsWay);
|
|
| 507 | + snprintf(buf, sizeof(buf), "GHC-%s %s", __GLASGOW_HASKELL_FULL_VERSION__, RtsWay);
|
|
| 507 | 508 | postCapsetStrEvent(EVENT_RTS_IDENTIFIER,
|
| 508 | 509 | CAPSET_OSPROCESS_DEFAULT,
|
| 509 | 510 | buf);
|