- Oct 18, 2024
-
-
Cheng Shao authored
(cherry picked from commit 94673d41)
-
Cheng Shao authored
This commit takes config.interp_force_dyn into consideration when setting up TH/ghci way flags. (cherry picked from commit 93b8af80)
-
Cheng Shao authored
This commit implements req_plugins predicate to indicate that the test requires plugin functionality. Currently this means cross GHC is disabled since internal-interpreter doesn't work in cross GHC yet. (cherry picked from commit 3c21b696)
-
Cheng Shao authored
This patch implements the targetRTSLinkerOnlySupportsSharedLibs predicate in hadrian. Its definition in hadrian is the single source of truth, and the information propagates to ghc settings file, ghc driver and testsuite driver. It is used in various places to ensure dynamic dependency is selected when the target RTS linker only supports loading dynamic code. (cherry picked from commit 8c74a0ed)
-
Cheng Shao authored
This commit implements the config.cross field in the testsuite driver. It comes from the "cross compiling" ghc info field for both in-tree/out-of-tree GHC, and is an accurate predicate of whether we're cross-compiling or not (compared to the precense of target emulator), and is useful to implement predicates to assert the precense of internal interpreter (only available on non-cross GHC) for tests that do require it (e.g. plugins). (cherry picked from commit 2956a3f7)
-
Cheng Shao authored
This commit bumps ci-image revision to use updated wasm toolchain, and use host_fully_static instead of fully_static for wasm jobs so to ensure wasm shared libraries can be properly built. (cherry picked from commit 5043507c)
-
alpine 3.20 was recently released and uses a new python and sphinx toolchain which could be useful to test. (cherry picked from commit 7bcda869)
-
Cheng Shao authored
This commit adds the host_fully_static flavour transformer to hadrian, which ensures stage0 is fully statically linked while still permitting stage1 libdir to contain shared libraries. This is intended to be used by the wasm backend to build portable linux bindists that contain wasm shared libraries. (cherry picked from commit b45080a3)
-
Cheng Shao authored
This commit re-enables --with-pic=yes configuration option of gmp when building for wasm, given we're about to include support for shared libraries, TH and ghci. (cherry picked from commit 775410fd)
-
Cheng Shao authored
This commit adds -fvisibility=default to CFLAGS of gmp when building for wasm. This is required to generate the ghc-bignum shared library without linking errors. Clang defaults to -fvisibility=hidden for wasm targets, which will cause issues when a symbol is expected to be exported in a shared library but without explicit visibility attribute annotation. (cherry picked from commit c247f2ee)
-
Cheng Shao authored
This commit enables internal-interpreter flag for ghc-bin even when compiling stage0, as long as target supports ghci. It enables ghci functionality for cross targets that support ghci, since cross ghc-bin is really stage0. (cherry picked from commit 577c1819)
-
Cheng Shao authored
This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. (cherry picked from commit f232c872)
-
Cheng Shao authored
This commit changes the hostSupportsRPaths predicate to targetSupportsRPaths and use that to decide whether to pass RPATH-related link-time options. It's not applied to stage0, we should just use the default link-time options of stageBoot ghc. (cherry picked from commit a6a82cdb)
-
Cheng Shao authored
This commit fixes conflicting StgRun definition when building dynamic ways of RTS for wasm in unregisterised mode. (cherry picked from commit bef94bde)
-
Cheng Shao authored
This commit wraps the predefined GlobalRegs in Wasm.S under a CPP guard to prevent building for PIC mode. When building dynamic ways of RTS, the wasm globals that represent STG GlobalRegs will be created and supplied by dyld.mjs. The current wasm dylink convention doesn't properly support exporting relocatable wasm globals at all, any wasm global exported by a .so is assumed to be a GOT.mem entry. (cherry picked from commit 98a32ec5)
-
Cheng Shao authored
This commit drops interpretBCO support from non dynamic rts ways on wasm. The bytecode interpreter is only useful when the RTS linker also works, and on wasm it only works for dynamic ways anyway. An additional benefit of dropping interpretBCO is reduction in code size of linked wasm modules, especially since interpretBCO references ffi_call which is an auto-generated large function in libffi-wasm and unused by most user applications. (cherry picked from commit 90a35c41)
-
Cheng Shao authored
(cherry picked from commit 0d0a16a8)
-
Cheng Shao authored
This commit wraps imported freeJSVal in a __wrapped_freeJSVal C function for wasm backend RTS. In general, wasm imports are only supposed to be directly called by C; they shouldn't be used as function pointers, which confuses wasm-ld at link-time when generating shared libraries. (cherry picked from commit 33d9db17)
-
Cheng Shao authored
This commit renames prelude.js to prelude.mjs for wasm backend rts jsbits, and slightly adjusts the jsbits contents. This is for preparing the implementation of dyld.mjs that contains wasm dynamic linker logic, which needs to import prelude.mjs as a proper ESM module. (cherry picked from commit 71a471e7)
-
Cheng Shao authored
This patch adds some missing CPP guards to ghc-internal, given those functions are non existent on wasm and would cause linking issues. (cherry picked from commit a998f69d)
-
Cheng Shao authored
This patch avoids using mmap() to allocate executable memory for mkConInfoTable on platforms without tables-next-to-code, see added comment for explanation. (cherry picked from commit 839ac52e)
-
Cheng Shao authored
This patch drops obsolete libffi Makefile from the tree, given it's completely unused since removal of make build system in !7094. (cherry picked from commit 3fe843c7)
-
Cheng Shao authored
This patch removes the ghciWithDebugger field from flavour config since it's actually not used anywhere. (cherry picked from commit c6e5fd3d)
-
Cheng Shao authored
This commit fixes link-time unresolved symbol errors for sem_open etc on wasm, by making runWorkerLimit always behave single-threaded. This avoids introducing the jobserver logic into the final wasm module and thus avoids referencing the posix semaphore symbols. (cherry picked from commit ceca9efb)
-
Cheng Shao authored
This patch fixes an error message in checkClosure() when the closure has already been evacuated. The previous logic was meant to print the evacuated closure's type in the error message, but it was completely wrong, given info was not really an info table, but a tagged pointer that points to the closure's new address. (cherry picked from commit 0d3bc2fa)
-
Cheng Shao authored
a.out is a configure script byproduct. It was mistakenly checked into the tree in !13118. This patch removes it, and include it in .gitignore to prevent a similar error in the future. (cherry picked from commit f0408eeb)
-
Cheng Shao authored
This commit fixes isMinTTY.h casing in isMinTTY.c that's compiled for Windows targets. While this looks harmless given Windows filesystems are case-insensitive by default, it does cause a compilation warning with recent versions of clang, so we might as well fix the casing: ``` driver\ghci\isMinTTY.c:10:10: error: warning: non-portable path to file '"isMinTTY.h"'; specified path differs in case from file name on disk [-Wnonportable-include-path] | 10 | #include "isMINTTY.h" | ^ #include "isMINTTY.h" ^~~~~~~~~~~~ "isMinTTY.h" 1 warning generated. ``` (cherry picked from commit 3a145315)
-
Cheng Shao authored
This patch removes the -fasm flag from test ways, except ways like optasm that explicitly state they are meant to be compiled with NCG backend. Most test ways should use the default codegen backend, and the precense of -fasm can cause stderr mismatches like this when GHC is configured with the unregisterised backend: ``` --- /dev/null +++ /tmp/ghctest-3hydwldj/test spaces/testsuite/tests/profiling/should_compile/prof-late-cc.run/prof-late-cc.comp.stderr.normalised @@ -0,0 +1,2 @@ +when making flags consistent: warning: [GHC-74335] [-Winconsistent-flags (in -Wdefault)] + Target platform uses unregisterised ABI, so compiling via C *** unexpected failure for prof-late-cc(prof_no_auto) ``` This has been breaking the wasm unreg nightly job since !12595 landed. (cherry picked from commit 88488847)
-
Cheng Shao authored
(cherry picked from commit 64fba310)
-
Cheng Shao authored
This patch changes mblock size to page size on wasm. It allows us to simplify our wasi-libc fork, makes it much easier to test third party libc allocators like emmalloc/mimalloc, as well as experimenting with threaded RTS in wasm. (cherry picked from commit 558353f4)
-
Cheng Shao authored
This patch replaces the ad-hoc `MYTASK_USE_TLV` with the `CC_SUPPORTS_TLS` macro. If TLS support is detected by autoconf, then we should use that for managing `myTask` in the threaded RTS. (cherry picked from commit f3017dd3)
-
Cheng Shao authored
This patch removes pre-C11 legacy code paths related to INLINE_HEADER/STATIC_INLINE/EXTERN_INLINE macros, ensure EXTERN_INLINE is treated as static inline in most cases (fixes #24945), and also corrects the comments accordingly. (cherry picked from commit 35a64220)
-
Cheng Shao authored
objc-hi/objcxx-hi should be skipped when cross compiling. The existing opsys('darwin') predicate only asserts the host system is darwin but tells us nothing about the target, hence the oversight. (cherry picked from commit 595c0894)
-
Cheng Shao authored
(cherry picked from commit 2eee65e1)
-
Cheng Shao authored
This patch removes CompilerInfo/LinkerInfo types from the compiler since they aren't actually used anywhere. (cherry picked from commit 98ad1ea5)
-
Cheng Shao authored
This commit fixes a subtle mistake in alignmentFromTypes that used to generate Unaligned when element type & index type are the same width. Fixes #24930. (cherry picked from commit 0cff083a)
-
Cheng Shao authored
(cherry picked from commit ae50a8eb)
-
Cheng Shao authored
This patch makes hadrian build in-tree GMP with the --enable-alloca=malloc-notreentrant configure option. We will only need malloc-reentrant when we have threaded RTS and SMP support on wasm32, which will take some time to happen, before which we should use malloc-notreentrant to avoid undesired runtime overhead. (cherry picked from commit 06277d56)
-
Cheng Shao authored
This patch disables in-tree GMP FFT code paths for wasm32 target in order to give up some performance of multiplying very large operands in exchange for reduced code size. (cherry picked from commit 1a32f828)
-
Cheng Shao authored
This patch disables PIC for in-tree GMP on wasm32 target. Enabling PIC unconditionally adds undesired code size and runtime overhead for wasm32. (cherry picked from commit f9c1ae12)
-