* Make isMSBuildOnNETCoreSupported return true on s390x
(fixes generating version headers)
* Add s390x platform-specific library name in find_unwind_libs
(enables linking against system-provided libunwind)
* Fixes for building for FreeBSD x64
Cross-build on Linux for FreeBSD x64 now uses LLVM provided lld
linker to create valid FreeBSD binaries.
find-native-compiler.sh will now look for clang versions 10, 11
and 12. init-compiler.sh will also look for version 12.
The cmake test for HAVE_ALLOC_H in eglib-config.h.cmake.in
would fail if it wasn't defined. The fix was to convert to
an normal C preprocessor #ifdef
Update the docker container to use the most recent version of
ubuntu-18.04-cross-freebsd-12
* Enable cross-build FreeBSD on Linux to find inotify library
Adjusted CMake settings to search the crossrootfs path
for libinotify.so
* Enable `EHCONT` and `CETCOMPAT` for some binaries on Windows
- Followup to https://github.com/dotnet/runtime/pull/55942
- Intended to be merged into a PR that updates to use new PGO profile data collected with the above change
- Enabled `/guard:ehcont` as a linker option for EXEs and DLLs
- Enabled `/cetcompat` as a linker option for DLLs
* Fix RHEL 8 ARM64
Clang on ARM64 places the .rodata section into the same segment
as .text. On RHEL 8 ARM64, the kernel is configured for 64kB
memory pages. When we flip the page protection of the page containing
the GS cookie to RW and back to RO, we assume that the cookie lives
in a non-executable memory. This assumption is broken on RHEL 8 and
we end up setting protection of a part of the coreclr code to read
only instead of back to RX.
This change switches the linker we use to lld from the previously
used gnu linker. That linker places .rodata into a different segment
than .text by default. Moreover, I was planning to move to using
lld anyways to use all build tools from LLVM.
* Fix ARM build to use PC relative addresses only
The lld linker has revealed that we were using absolute addresses in some
asm helpers and so load time relocation was necessary. This change fixes
it by replacing all of those by PC relative ones.
* Update docker images used for building runtime
Use new images that have lld linker
* Disable lld linker for s390x
* Enable `EHCONT` for some DLLs and for PGO instrumentation
- PGD files used for PGO optimziation need to be collected/produced against binaries with identical compiler features
- Enabled `/guard:ehcont` as a compiler option but not as a linker option
- Enabled `/guard:ehcont` and `/cetcompat` as a linker options for PGO instrumentation only for now
- Once new profile data is published, another PR would follow to enable `/guard:ehcont` and `/cetcompat` as linker options
* Fix build
* Use alternatives to redirecting threads via IP changes in the context, for a few cases on Windows
- For GC/debugger suspension, a new variant of an APC is used to interrupt the thread
- For hardware exceptions, an exception is raised from the vectored exception handler instead of redirecting and then raising an exception
- Made changes to enable /guard:ehcont and /cetcompat for binaries, but commented out the enablement for now since it looks like we will first need .pgd files generated with /guard:ehcont and published for release builds to succeed
Fixes an issue where deleting the intermediates folder locally would get the build in a bad state where the command-line check would be up to date but the CMake files would not be generated.
* Fix MacOS build on 11.x SDK and Catalyst build
The configure.cmake was not getting the minimum supported OS version because
it was being set via set_compile_options and the config functions can only
get options from CMAKE_XXX_FLAGS.
* Add comment explaining why we set the macOS options via CMAKE_XXX_FLAGS
* Add PAL implementation for Linux on s390x
* Define BIGENDIAN on s390x when compiling coreclr
* Provide a default HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE
value in eng/native/tryrun.cmake
In the Win32 version resource, this changes the "Comment" field
from:
```
Flavor=Checked
```
to:
```
Flavor=Debug
```
It also properly sets `BUILDENV_DEBUG=1` for debug builds (only used in
exactly one place: gc.cpp).
* enable compression of assemblies
* fix Unix build
* map should use converted layout for compressed
* enable execution for R2R
* fixes for OSX
* PR feedback (comments)
* more PR feedback
* shorter include path to pal_zlib.h
* Apply suggestions from code review
Co-authored-by: Vitek Karas <[email protected]>
Co-authored-by: Vitek Karas <[email protected]>
On Apple Silicon, the command `arch -x86_64 XYZ` allows executing XYZ
as if on an AMD64 CPU, rather than an ARMv8 CPU, for cases where both
are possible (e.g. a shell script like build.sh).
The deleted lines of code bypass the lies `arch` writes into uname,
and instead forcibly detects the true nature of the host system's CPU
regardless of whether or not the developer has reasons to lie.
Whilst this trick was important in the early days of bringing up
Apple Silicon support, it should hopefully now be obsolete.
This fixes linking of LLVM in Mono runtime builds, where
`arch -x86_64 ./build.sh -arch x64` would still attempt to link
against ARM64 LLVM.
Fix build on windows in folders containing space(s) in the name and also
in case where `EMSDK_PATH` contains space(s).
* Add few quotes
To fix windows build in directory containing spaces.
* Add quotes around link attributes paths
* More quotes and trimming
* More improvements related to EMSDK_PATH
* Use immediate set for EMSCRIPTEN_VERSION
* Do not set ExeExt twice
* Force ninja on Browser/windows
And check for cmake and ninja in CheckEnv
* Apply Ankit's quotation changes
* Simplify forcing wasm, fix typos
* Use -File instead of & "<ps1 script>"
* Fix typo
* Only add the escaped quotes on windows
Co-authored-by: Ankit Jain <[email protected]>
Previously, we have had four iOS RIDs:
iOS-arm
iOS-arm64
iOS-x86
iOS-x64
Apple has never shipped an iOS device with an x86 or x64 processor. Instead, the x86/x64 RIDs have meant "iOS simulator with these arches" as opposed to "iOS with these arches". Amongst other things, that means building against a DIFFERENT SDK, iPhoneSimulator.platform vs iPhoneOS.platform
In the Apple Silicon future, the iOS simulator is now an ARM64 binary - so we need:
iOS-arm
iOS-arm64
iOS-arm64, but built against the simulator SDK not the device SDK
iOS-x86
iOS-x64
Clearly, there's a problem.
The solution is to move the simulators to a different RID, to avoid the overloading issue:
iOS-arm
iOS-arm64
iOSSimulator-arm64
iOSSimulator-x86
iOSSimulator-x64
This PR introduces the new entries in the RID graph, moves our existing iOS-x{86,64} to iOS-sim-x{86,64}, adds a new iOS-arm64.
The above also applies for tvOS, with a smaller set of OSes:
tvOS-arm64
tvOSSimulator-arm64
tvOSSimulator-x64
Ref: #48216
* First pass at building wasm on windows
* Adds support for building wasm on Windows
Emscripten and EMSDK_PATH must be set up externally. This differs from linux and macos
where we optionally can do it for you.
* Cleanup
* Feedback
* Rename conflicting target
* Made sure current master still works
* auto provision when EMSDK_PATH is not set and try to see if a browser build works on windows
* Add call in front of batch scripts. All of a sudden it's necessary
* Use RunWithEmSdkEnv task
* Override arch for Browser OS
Similar to what we do in build.sh
* Update machine certificates
To avoid this error:
Installing tool 'node-12.18.1-64bit'..
Installation failed!
Error: Downloading URL 'https://storage.googleapis.com/webassembly/emscripten-releases-builds/deps/node-v12.18.1-win-x64.zip': <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1045)>
Warning: Possibly SSL/TLS issue. Update or install Python SSL root certificates (2048-bit or greater) supplied in Python folder or https://pypi.org/project/certifi/ and try again.
Warning: The SDK/tool 'node-12.18.1-64bit' cannot be activated since it is not installed! Skipping this tool...
The script comes from runtimelabs repo https://github.com/dotnet/runtimelab/blob/d0cda961aeda26faae17c474e26d822cd1e45438/eng/pipelines/runtimelab/update-machine-certs.ps1
* Use msbuild to write the emcc version file
* Put emscripten version in text file
And use it in Makefile and mono.proj
* Try to fix Browser_wasm_Windows detection
* Install native dependencies
I think we are missing cmake and failing with:
configure: cmake -DENABLE_WERROR=1 -DCMAKE_INSTALL_PREFIX=D:\workspace\_work\1\s\artifacts\obj\mono\Browser.wasm.Debug\out -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug -DGC_SUSPEND=preemptive -DENABLE_MINIMAL=jit,portability,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,shared_perfcounters,interpreter,threads,eventpipe,qcalls -DENABLE_INTERP_LIB=1 -DDISABLE_ICALL_TABLES=1 -DDISABLE_CRASH_REPORTING=1 -DENABLE_ICALL_EXPORT=1 -DENABLE_LAZY_GC_THREAD_CREATION=1 -DENABLE_LLVM_RUNTIME=1 -DENABLE_METADATA_UPDATE=1 "-DCMAKE_C_FLAGS= -fexceptions -ID:\workspace\_work\1\s\.packages\microsoft.netcore.runtime.icu.transport\6.0.0-preview.3.21151.1/runtimes/browser-wasm/native/include" "-DCMAKE_CXX_FLAGS= -fexceptions" D:\workspace\_work\1\s\src\mono\ -DCMAKE_TOOLCHAIN_FILE=D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\cmake\Modules\Platform\Emscripten.cmake -DCMAKE_CROSSCOMPILING_EMULATOR="D:/workspace/_work/1/s/src/mono/wasm/emsdk/node/12.18.1_64bit/bin/node.exe" -G Ninja
Traceback (most recent call last):
File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\\emcmake.py", line 33, in <module>
sys.exit(run())
File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\\emcmake.py", line 26, in run
building.configure(sys.argv[1:])
File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\tools\building.py", line 339, in configure
run_process(args, stdout=stdout, stderr=stderr, env=env, **kwargs)
File "D:\workspace\_work\1\s\src\mono\wasm\emsdk\upstream\emscripten\tools\shared.py", line 94, in run_process
ret = subprocess.run(cmd, check=check, input=input, *args, **kw)
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 472, in run
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 775, in __init__
File "D:\obj\windows-release\37amd64_Release\msi_python\zip_amd64\subprocess.py", line 1178, in _execute_child
FileNotFoundError: [WinError 2] The system cannot find the file specified
D:\workspace\_work\1\s\src\mono\mono.proj(410,5): error MSB3073: The command "call D:\workspace\_work\1\s\src\mono\wasm\emsdk\emsdk_env.bat && emcmake cmake -DENABLE_WERROR=1 -DCMAKE_INSTALL_PREFIX=D:\workspace\_work\1\s\artifacts\obj\mono\Browser.wasm.Debug\out -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug -DGC_SUSPEND=preemptive -DENABLE_MINIMAL=jit,portability,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,shared_perfcounters,interpreter,threads,eventpipe,qcalls -DENABLE_INTERP_LIB=1 -DDISABLE_ICALL_TABLES=1 -DDISABLE_CRASH_REPORTING=1 -DENABLE_ICALL_EXPORT=1 -DENABLE_LAZY_GC_THREAD_CREATION=1 -DENABLE_LLVM_RUNTIME=1 -DENABLE_METADATA_UPDATE=1 -DCMAKE_C_FLAGS=" -fexceptions -ID:\workspace\_work\1\s\.packages\microsoft.netcore.runtime.icu.transport\6.0.0-preview.3.21151.1/runtimes/browser-wasm/native/include" -DCMAKE_CXX_FLAGS=" -fexceptions" D:\workspace\_work\1\s\src\mono\" exited with code 1.
##[error]src\mono\mono.proj(410,5): error MSB3073: (NETCORE_ENGINEERING_TELEMETRY=Build) The command "call D:\workspace\_work\1\s\src\mono\wasm\emsdk\emsdk_env.bat && emcmake cmake -DENABLE_WERROR=1 -DCMAKE_INSTALL_PREFIX=D:\workspace\_work\1\s\artifacts\obj\mono\Browser.wasm.Debug\out -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Debug -DGC_SUSPEND=preemptive -DENABLE_MINIMAL=jit,portability,sgen_major_marksweep_conc,sgen_split_nursery,sgen_gc_bridge,sgen_toggleref,sgen_debug_helpers,sgen_binary_protocol,logging,shared_perfcounters,interpreter,threads,eventpipe,qcalls -DENABLE_INTERP_LIB=1 -DDISABLE_ICALL_TABLES=1 -DDISABLE_CRASH_REPORTING=1 -DENABLE_ICALL_EXPORT=1 -DENABLE_LAZY_GC_THREAD_CREATION=1 -DENABLE_LLVM_RUNTIME=1 -DENABLE_METADATA_UPDATE=1 -DCMAKE_C_FLAGS=" -fexceptions -ID:\workspace\_work\1\s\.packages\microsoft.netcore.runtime.icu.transport\6.0.0-preview.3.21151.1/runtimes/browser-wasm/native/include" -DCMAKE_CXX_FLAGS=" -fexceptions" D:\workspace\_work\1\s\src\mono\" exited with code 1.
* Try use newer cmake
* Revert "Try use newer cmake"
This reverts commit bd95f346f9a3c5828924201c79df3b356043c11c.
* Normalize path
* Remove excessive space char
* Try newer emscripten version
To try if it helps with the cmake issue
* Try trim end '\' from directory passed to cmake
Also revert emscripten version back
* Provision emscripten only when targeting wasm
* Do not set $os, it is already set above
* Revert "Remove excessive space char"
This reverts commit b1c4da12a0c39e78b0cf02d1da1332a55cedf772.
* Provision emscripten only on windows
Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Radek Doulik <[email protected]>
* Implementing mscordbi on mono to support icordebug
* Fix eval, fix step and cancel step, remove suspend status on mscordbi
* Using log from coreclr as mscordbi does
* Missing files
* Removing eglib from implementation
* Compiling on Mac
* Compiling and Working on windows.
Changing what @lambdageek suggested about mono_atomic_inc_i32
* Generating libmscordbi on mac
* Fix socket on mac
* Counting references, deleting objects, removing unecessary properties,
formating with cland-format, renaming properties to follow the used
pattern.
* Checking error when get reply from debugger
* Fix format, reuse regmeta from coreclr and try to fix compilation on
windows
* Dont build when target is android or ios or wasm
* Fix error unused variable
* Fixing error: 'CFUserNotificationDisplayAlert' is unavailable: not
available on macCatalyst
* Fix compilation error on Linux
* Fix function not found in maccatalyst
Fix warning as error of macro redefinition
* Dont compile mscordbi on maccatalyst
* Fix compilation on linux
* Fix compilation on android, ios and browser
* Fix compilation on linux
* Fix cross compiling
* Fix compilation x86 windows
* Fix x86 compilation
* Fix compilation on windows
* Fix cmake error
* Fix cmake
* Fix arm64 mac
* Fix windows compilation
* Fix memory leak
* Returning E_NOTIMPL where it was possible and it's not implemented as
suggested by @cshung
* Fix what @cshung
* Use only one ref count
* Adding ex_try everywhere that we could have an allocation failure.
* Implementing get class
* Apply suggestions from code review
Co-authored-by: Noah Falk <[email protected]>
* Fix what @noahfalk suggested in his review.
* Fixing what was suggested by @viniciusjarina
* Fix what was suggested by @viniciusjarina
* Changing what @noahfalk suggested
* Accept more than 1 stepper per thread
* Changing what was suggested by @noahfalk
* Using CORDB_ADDRESS to return addresses from debugged process
* Fix eval
* Update src/mono/mono/mini/debugger-agent.c
Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>
* Using 1:1 with runtime for cordbtype and cordbclass
* Rnaming methods as suggested by @lambdageek
* Update src/mono/dbi/cordb-process.h
Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>
* Update CMakeLists.txt
* Fix arm64 compilation
* Fix arm64 compilation
* Fix error cmake
* fix arm64 compilation
* Fix arm64 compilation
* Fix arm64 compilation
* Fix arm64 compilation
* Revert "Fix arm64 compilation"
This reverts commit 25f24bc7ac66966fe59805e54e4009c909608b2c.
* Revert "Fix arm64 compilation"
This reverts commit a8f0318881d7b3e6b5a69b1b56c17478a71fdb4f.
* Revert "fix arm64 compilation"
This reverts commit b5de06dcf00bf296f2c8f4b47aa2492afbd73acd.
* Revert "Fix error cmake"
This reverts commit 2aae4636499d073ca5aa6fb9319d84875be6e08e.
* Revert "Fix arm64 compilation"
This reverts commit ae5f701589c3bd8ca04b9d9369af2b285a5d9bd0.
* Revert "Fix arm64 compilation"
This reverts commit 94d957c7416a900c9e90dec53900a104572ea6a1.
* Removing arm64 compilation
* Remove arm64 compilation
Co-authored-by: Noah Falk <[email protected]>
Co-authored-by: Aleksey Kliger (λgeek) <[email protected]>
As per the documentation, Homebrew uses a different install directory for Brew on Intel vs. Apple Silicon. We have hardcoded the Intel location in a couple of places, so instead switch to pulling the prefix from brew --prefix