* Branding PreReleaseVersionLabel and PreReleaseVersionIteration
* Set PRERELEASE 0 in configureplatform.cmake
* Add check to properly handle release/rtm naming for workloads
Ported from a419d357c6
---------
Co-authored-by: Eric StJohn <ericstj@microsoft.com>
* Second attempt at fixing ARM64 cross compilation
* Update eng/native/init-vs-env.cmd
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Remove x86 branch
* Revert to using __HostArch when determining toolset.
* Address feedback.
* Update eng/native/init-vs-env.cmd
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update eng/native/init-vs-env.cmd
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Revert "Update eng/native/init-vs-env.cmd"
This reverts commit a1b95c1942c244ae10f2113fc89dfa821dba4fff.
* Revert "Update eng/native/init-vs-env.cmd"
This reverts commit 1eeadb38d28a4f484382ae345e57684f8c56da6e.
* Set the correct arm64 assembler host
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Use ARM64 tools when building on ARM64 hosts
* Fix cross-compiling arm64 from x64
* Update src/coreclr/build-runtime.cmd
Co-authored-by: Steve <hez2010@outlook.com>
---------
Co-authored-by: Steve <hez2010@outlook.com>
I'm trying to make it slightly easier to install the needed requirements, and add some validation if a user hasn't installed the requirements.
Also, I validated that these instructions still work for Ubuntu 24.04 and have noted that other installs are only community-supported.
This replaces our dependency of madler/zlib and zlib-intel with a dependency to an in-tree copy of zlib-ng, which will be used across coreclr, mono and nativeaot.
Mobile platforms (android, tvos, ios, maccatalyst) and armv6 are excluded from using the in-tree zlib-ng copy, and they will find and use the system-installed zlib instead.
---------
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
This adds some extra line to the messages that cmake prints out:
-- The C compiler identification is Clang 18.1.6
...
-- The linker identification is LLD 18.1.6 (compatible with GNU linkers)
...
This makes it easier to see which linker is being used by the runtime.
This is useful in debugging, specially in scenarios where we pick the
wrong linker and then produce a broken runtime (like
https://github.com/dotnet/runtime/issues/43349), but have no quick way
to tell what linker was actually used.
For stdcpp conformance, remove the remaining special extensions.
* clean up unnecessary __llvm special handling.
* Add class, enum, struct prefixes to cases where the variable name is clashing with type name and it changes meaning (-Werror=changes-meaning)
* In some trivial cases, I just renamed the variables..
* On x86, replace `__asm {}` syntax with `__asm ("")`
* Two small illumos related build fixes under `src/native` which helped validating the rest of the changes on the platform.
When a pinvoke/reverse pinvoke needs marshalling the VM creates an IL stub to
perform this marshalling. These IL stubs have a non-standard parameter called
the "secret stub parameter". The VM uses this parameter to map the IL stub back
to the user defined function that caused the IL stub to be required (multiple
user functions can share the same IL stubs, so the mapping cannot be done by
other means).
To facilitate the access of this value the JIT must make the parameter's value
available to the VM somehow. Previously this was done in two separate ways for
32-bit and 64-bit target:
- For 32-bit targets the parameter was marked as do-not-enregister and always
spilled to the stack frame at a location that was known by the VM.
- For 64-bit targets the parameter was saved in the `InlinedCallFrame` as part
of a VM helper call. We still marked it as do-not-enregister, probably because
parameter homing did not handle it.
For 64-bit targets this introduces a bit of inefficiency: the secret stub
parameter is only needed for the IL stubs case, but `InlinedCallFrame` is used
for all inlined pinvokes. So we ended up with a larger frame than necessary and
with an additional store to the frame, even outside IL stubs.
This change removes that inefficiency by unifying how 32-bit and 64-bit targets
work:
- Switch all platforms to only allocate space in `InlinedCallFrame` for the
secret stub parameter when necessary
- Move responsibility of storing the secret stub parameter out of
`CORINFO_HELP_INIT_PINVOKE_FRAME` and to the JIT generated code
- Remove special casing of frame layout around the secret stub parameter and
frame structures within the JIT
- Enable enregistration for the secret stub parameter
Fix#100662
* Use the emsdk transport packages to build wasm instead of a cloned emsdk
Works for the most part out of the box, but fails on the part where we npm install after
the libraries build. The reason for the failure is our node transport package is incomplete. If
you replace it with a legit node, the build works fully.
* Pull in node transport package as opposed to the one packaged in emsdk. Streamline package deps
* Make paths friendly for windows
* Work in windows transport packages, copy python to its own directory, and adjust a bunch of paths
* Bump to latest version of node that contains icu
* Add windows deps and add DOTNET_EMSCRIPTEN_NODE_PATH because windows can't see npm without it
* Bump emscripten packages to the latest
* Fix typos in Version.Details.xml
* Switch out to the plain mariner container to ensure no EMSDK already exists
* Revert back to the browser-wasm docker image and bump to the latest
* Container type-o
* Fix condition where the node path isn't set properly
* Provision even when building offsets
* Fix goofy paths
* Update new template to use the latest browser-wasm container
* Don't put python.exe on the path for windows, but the folder instead
* So that was a bad idea. May have to have emsdk_env.cmd have two entries
* Fix offsets generation for browser
* Fix emsdk's python path
It is not versioned anymore as we use the content of our nugets
* Fix EMSDK_PATH on non-windows platforms
* Do not add link flags to compile flags
To avoid:
C:\helix\work\correlation\build\wasm-shared\WasmApp.Common.targets(825,5): error : emcc: warning: linker setting ignored during compilation: 'EXPORT_ES6' [-Wunused-command-line-argument] [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
C:\helix\work\correlation\build\wasm-shared\WasmApp.Common.targets(825,5): error : emcc: warning: linker setting ignored during compilation: 'EXPORT_EXCEPTION_HANDLING_HELPERS' [-Wunused-command-line-argument] [C:\helix\work\workitem\e\publish\ProxyProjectForAOTOnHelix.proj]
* Set the emsdk paths relative to the script location
* Escape few characters and fix the added script
* Fix .emscripten script
* Use EM_CONFIG intead of __file__
* Fix emsdk_env.cmd script
* Revert "Do not add link flags to compile flags"
This reverts commit eb19ade3ef901669a7e6bcc944703837f26f5173.
* Revert changes in package-lock.json
* Feedback + cleaning
* More cleaning
* Try not to use the replace in the EMSDK_PATH
* Better property names
* Use package and emsdk version properties
Co-authored-by: Larry Ewing <lewing@microsoft.com>
* Use the updated properties
* Fix emsdk version
* Use a single version of emsdk and take node version from flow
* Update eng/Version.Details.xml
Co-authored-by: Larry Ewing <lewing@microsoft.com>
---------
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
Co-authored-by: Radek Doulik <radek.doulik@gmail.com>
Co-authored-by: Radek Doulik <radekdoulik@gmail.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
This is a small workaround to allow developers working on Mac the
ability to generate .dSYM bundles as part of inner-loop development,
instead of the unsupported .dwarf files that are generated by default.
A full solution to use .dSYM bundles everywhere on Mac, including
packaging and symbol indexing, is tracked by
https://github.com/dotnet/runtime/issues/92911.
To build .dSYM bundles instead of .dwarf files, invoke build.sh as
follows:
```bash
./build.sh --subset clr --cmakeargs "-DCLR_CMAKE_APPLE_DSYM=TRUE"
```
- Remove malloc-family PAL and update callsites that might get passed 0 to bump up to 1.
- Move `getenv` usage to use the `PAL` function directly when on non-Windows (to preserve the existing behavior).
- Remove other remaining CRT PAL shims
- Remove header shims and enable building with the CRT and STL headers across the product, with various build fixes required (mostly around using the standard min/max definitions)
clang 18 introduces `-Wswitch-default`, which requires that every switch
must have a `default` branch. We can add missing `default` in switches,
but the other option `-Wcovered-switch-default` complains if all the
cases in a switch are exhaustive and `default` doesn't do anything. So
disable one of these mutually exclusive warnings.
We will also need to merge in the changes from
https://github.com/dotnet/arcade/pull/14572 to actually try and use
clang-18/clang++-18.
Without this change, put this in configurecompiler.cmake:
```
message("CLR_CMAKE_TARGET_UNIX: ${CLR_CMAKE_TARGET_UNIX}, CLR_CMAKE_TARGET_LINUX: ${CLR_CMAKE_TARGET_LINUX}, CLR_CMAKE_TARGET_BROWSER: ${CLR_CMAKE_TARGET_BROWSER}")
```
Run:
```
$env:EMSDK_PATH=...
./build libs.native -a wasm -os browser
```
Observe:
```
CLR_CMAKE_TARGET_UNIX: 1, CLR_CMAKE_TARGET_LINUX: , CLR_CMAKE_TARGET_BROWSER: 1
```
Also adds the corresponding HOST defines for consistency.
* Remove /GR flag as new CMake Policy doesn't add it by default.
* Tell CMake to use the new behavior of CMP0117.
* CMake policy is by default set when not specified, so removing the
explicit setting in CMakeLists.txt
* Flag /GR- fix.
* Restored accidentally deleted comment.
* Add universal `-W3` option to CMakeLists.txt, as the new policy
CMP0092 no longer adds it by default, and we use it.
* Had not noticed there was already a W3 removal in the compilers'
configuration. So no need to add another W3, just remove that removal.
* Successfully replaced pushd/popd with CMake's -S/-B in gen-buildsys.sh
for native and clr. Now, looking into removing other instances if
possible.
* Removed redundant pushd/popd in src/native/libs/build-native.cmd
* Experimenting with removing 'pushd/popd' for Wasm/Wasi.
* Restored pushd/popd to eng/native/build-commons.sh because it is
actually not directly related to CMake.
* Add explicit exit code to gen-buildsys.sh
Make sure we don't forget to return the cmake exist code, see https://github.com/dotnet/runtime/pull/95408.
* Replace with comment instead
---------
Co-authored-by: Alexander Köplinger <alex.koeplinger@outlook.com>
The coreclr runtime currently doesn't honor virtual memory size limit
specified by the rlimit APIs (or the `ulimit -v` shell command).
There were couple of cases in the past where people have hit this
problem when trying to run .NET on systems where the administrators
have applied virtual memory limit for all users as a simple mean
to limit the physical memory usage.
This change enables honoring that limit in the GC and PAL preallocator
of the initial executable memory, as those two are the factors preventing
coreclr execution on such systems.
* Revert "Fix target_link_options in pgosupport.cmake (#93670)"
This reverts commit fa0ba15be6.
* Revert "Use `add_link_options` and `target_link_options` in cmake (#92844)"
This reverts commit 3086d8a1c3.
I noticed that we wrote the cache file before invoking cmake, this meant that if the cmake configure step failed (e.g. because of an invalid command like in #93670) then running the build again would skip cmake configure, resulting in a broken build setup.
This only applies to non-VS generators like ninja.