1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-09 09:34:49 +09:00
Commit graph

343 commits

Author SHA1 Message Date
Carlos Sánchez López
4e61baae6c
[release/9.0] Branding for GA (#107879)
* 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>
2024-09-17 11:22:11 -06:00
Jeremy Koritzinsky
aa3825e53b
Fix C5271 warning in IJW tests (#106153) 2024-08-09 10:32:38 -07:00
Pavel Savara
ab03e0ffc0
[WASI] bump WASI SDK 24 (#105317)
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
2024-08-05 17:33:33 +02:00
Alexander Köplinger
2c70e36356
Add support for AES-GCM and ChaCha20Poly1305 on iOS/tvOS/MacCatalyst via CryptoKit (#104383)
Now that we support minimum OS versions that ship with Swift we can enable CryptoKit and pal_swiftbindings.swift.

Fixes https://github.com/dotnet/runtime/issues/91523
2024-07-22 23:11:09 +02:00
Marek Habersack
8e6df8de02
[Android] Link native shared libraries with 16k page alignment (#104577)
Fixes: https://github.com/dotnet/runtime/issues/103360
Context: https://developer.android.com/guide/practices/page-sizes
Context: https://github.com/android/ndk/wiki/Changelog-r27#announcements

Sometime next year Google will start requiring that all the `.so`
libraries included in applications submitted to the Play Store to be
aligned to 16k page boundary (as opposed to the current one of 4k).

Make changes to cmake scripts used to build both the BCL native
libraries and the MonoVM so that the resulting shared libraries have the
correct alignment.

Co-authored-by: Michal Strehovský <MichalStrehovsky@users.noreply.github.com>
2024-07-16 17:19:06 +02:00
Eirik Tsarpalis
369db9a68e
Ensure that the correct VC++ toolset is selected in all build environments (#104763)
* 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>
2024-07-13 05:40:18 +01:00
Pavel Savara
a955d599c2
[Wasi] switch to preview 2 (#104683)
Co-authored-by: Joel Dice <joel.dice@fermyon.com>
Co-authored-by: SingleAccretion <62474226+SingleAccretion@users.noreply.github.com>
2024-07-12 15:42:14 +02:00
Pavel Savara
8b3bde3f5e
[wasi] back to WASI_SDK_PATH and detection improvement (#104729) 2024-07-11 18:35:15 +02:00
Eirik Tsarpalis
ebaa0cd6c0
Use ARM64 tools when building on ARM64 hosts (#104695)
* 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>
2024-07-11 15:02:24 +01:00
Pavel Savara
812cb93edb
[WASI] use WASI_SDK22_PATH variable (#104379) 2024-07-10 12:44:45 +02:00
Andy Gocke
f0ff6d6948
Revert "Add more complete linux build instructions (#101631)" (#104581)
This reverts commit 55747a5866.
2024-07-08 16:38:49 -07:00
Andy Gocke
55747a5866
Add more complete linux build instructions (#101631)
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.
2024-07-08 23:15:02 +00:00
Carlos Sánchez López
cf08d43a93
Migrate to zlib-ng, part 2: consume it in runtime (second attempt) (#104454)
* Reapply "Migrate to zlib-ng, part 2: consume it in runtime (#102403)" (#104414)
* Apply jkotas comment suggestion in configureplatform.cmake
* Delete unnecessary comment in zlib-ng.cmake
* Fix windows nativeaot failure happening when executing:

build.cmd -ci -arch x64 -os windows  -s clr.nativeaotlibs+clr.nativeaotruntime+libs+packs -c Release /p:BuildNativeAOTRuntimePack=true /p:SkipLibrariesNativeRuntimePackages=true
2024-07-08 23:11:47 +00:00
Andy Gocke
5b86dca8e7
Revert "Migrate to zlib-ng, part 2: consume it in runtime (#102403)" (#104414)
This reverts commit f5c9a5e8f5.
2024-07-04 15:47:50 +02:00
Carlos Sánchez López
f5c9a5e8f5
Migrate to zlib-ng, part 2: consume it in runtime (#102403)
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>
2024-07-02 23:25:58 -07:00
Adeel Mujahid
66a0053ac9
Capture first line of linker version only (#104136)
* Capture first line of linker version only

* .
2024-06-28 16:44:16 +02:00
Omair Majid
2fc4bba579
Show the linker cmake is using (#104045)
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.
2024-06-27 14:20:31 +02:00
Adeel Mujahid
87cd2c4257
Delete some unused cmake defines (#103441)
* Delete some unused cmake defines

* Update src/mono/cmake/config.h.in
2024-06-15 21:57:11 -07:00
Adeel Mujahid
3099f31cc7
Delete -fms-extensions from coreclr native build (#102834)
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.
2024-06-14 21:59:19 -07:00
Levi Broderick
fb1fe7f348
Remove vestigial HAVE_LARGE_SNPRINTF_SUPPORT checks (#103106)
* Remove vestigial HAVE_LARGE_SNPRINTF_SUPPORT checks

* Remove unneeded references to SSCANF_SUPPORT_ll
2024-06-07 05:04:06 -07:00
Adeel Mujahid
fbe0e613fd
Delete __if_exists (#102277)
Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
2024-05-29 09:41:52 -07:00
Jakob Botsch Nielsen
073e35e7e3
Simplify "secret stub arg" handling between JIT and EE (#100823)
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
2024-05-12 22:21:35 +02:00
Steve Pfister
52638488c4
[wasm] Use source built emsdk packages for the runtime build (#100266)
* 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>
2024-05-09 16:31:41 +02:00
Jeremy Koritzinsky
40878c881b
Don't enable use-after-return checking on Apple's Clang (#101781) 2024-05-03 07:18:18 -07:00
Jan Kotas
80aa464412
Backport assorted changes from runtimelab (#101655)
* Backport assorted changes from runtimelab
- Official build template
- FEATURE_HIJACK define
- Misc other cleanup

* Delete unused DATA_ALIGNMENT definition
2024-04-30 06:26:56 -07:00
Pavel Savara
d0dffe1dcf
[WASI] update WASI SDK to 22 and wasmtime to 19.0.2 (#101392) 2024-04-25 14:59:01 +02:00
Alexander Köplinger
0a220d534b
Bump minimum Apple OS versions (#101342)
As defined in the ".NET 9 - Supported OS versions" document: https://github.com/dotnet/core/blob/main/release-notes/9.0/supported-os.md

- macOS 12.0
- iOS/iOSSimulator 12.2
- tvOS/tvOSSimulator 12.2
- MacCatalyst 15.0 (== macOS 12.0)

Fixes https://github.com/dotnet/runtime/issues/91736
2024-04-23 15:23:13 +02:00
Bruce Forstall
3515c7a8eb
Add build option to build Mac .dSYM debug symbol bundles (#100617)
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"
```
2024-04-05 13:49:57 -07:00
Jeremy Koritzinsky
5c4e2a301e
Remove remaining CRT PAL wrappers and enable including standard headers in the CoreCLR build (#98336)
- 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)
2024-04-03 20:31:21 -07:00
Adeel Mujahid
cc7bf831f0
Define _TIME_BITS=64 globally (#100461)
Contributes to #96460
2024-03-30 11:40:47 -07:00
Omair Majid
ac1b4786b5
Disable new warnings introduced with clang 18 (#99811)
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.
2024-03-15 16:58:21 +01:00
Levi Broderick
1e2fdb5124
Enable most SDL-required C/C++ warnings (#99470)
* Enable most SDL-required C/C++ warnings

* Suppress C4242 checks for tests
2024-03-11 22:01:33 -07:00
Adeel Mujahid
77c22ee384
Pass --target in preprocess_file() (#99251) 2024-03-05 22:07:25 -08:00
Adeel Mujahid
b020042548
Enable building cross components from linux-arm64 (#99252)
* Enable building cross components from linux-arm64

* Update error message
2024-03-04 21:13:08 -08:00
Jeremy Koritzinsky
0ce3c32f6c
Remove CoreCLR math.h CRT PAL Redefines (#98048) 2024-02-10 09:21:50 -08:00
Filip Navara
d247d72a4e
Fix building on ARMhf userland on top of AARCH64 kernel (#97929)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
2024-02-05 18:17:09 -08:00
Filip Navara
4cff20f61f
Use eng/common/native/init-os-and-arch.sh instead of eng/native/init-os-and-arch.sh (#97967) 2024-02-05 06:20:07 -08:00
SingleAccretion
5342824129
Fix the definition of TARGET_BROWSER in CMake (#97254)
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.
2024-01-24 08:04:44 -08:00
Ivan Diaz Sanchez
3ffa1a9699
Remove Explicit Deletion of CMake /GR Flag as 3.20's *CMP0117* by Default Doesn't Add It (#96814)
* 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.
2024-01-17 15:22:45 -08:00
Ivan Diaz Sanchez
15eb4df61f
Enable CMake Flag -W3 as New CMP0092 no Longer Does it Implicitly (#97053)
* 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.
2024-01-17 15:21:24 -08:00
Ankit Jain
a36a860f74
[wasm] Extract src/mono/browser from src/mono/wasm (#95940)
* [wasm] Extract src/mono/browser from src/mono/wasm, and update to track changes

* [wasm] Makefile - update to remove some unrelated targets

* [wasm] Rename wasm.proj to browser.proj - feedback from @ maraf

* Add the renamed browser.proj

* address review feedback from @ maraf

* review feedback from @ pavelsavara

* address review feedback from @ maraf
2023-12-19 10:03:41 -05:00
Alexander Köplinger
f1d2587958
Add Android support to System.IO.Ports (#95749)
Fixes https://github.com/dotnet/runtime/issues/86619

Also removes unused HAVE_TERMIOS2_EXITCODE from tryrun.cmake, the HAVE_TERMIOS2 check is not a tryrun one but a compile check.
2023-12-07 23:55:10 +01:00
Jan Kotas
0c7c10ee60
Revert "Windows executables: only load imported DLLs from System32 (#89311)" (#95540)
This reverts commit 9c3f8b3727.
2023-12-04 10:50:12 -08:00
Ivan Diaz Sanchez
9bb2b5be2e
Replace pushd/popd Calls With -S/-B CMake Flags in the Build System (#94353)
* 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>
2023-11-29 10:46:09 -08:00
Alexander Köplinger
20464329b1
Fix iOS/tvOS NativeAOT builds (#95405)
https://github.com/dotnet/runtime/pull/80295 added a new entry to tryrun.cmake but iOS/tvOS use a separate tryrun_ios_tvos.cmake which was missing the new entry.
2023-11-29 17:46:00 +01:00
Jan Vorlicek
eb64819eac
Honor virtual memory limit (#80295)
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.
2023-11-28 17:41:47 +01:00
Raphtaliyah
487d7f010b
Fix build issues with clang18 (#94782)
* Fixed build issues with clang18

* Convert use of VLAs to alloca

* Enable warnings for VLAs

* Convert VLA to alloca in Apple specific code
2023-11-16 06:39:13 -08:00
Jan Kotas
6f0b1b1375
Revert "Use add_link_options and target_link_options in cmake (#92844)" (#93838)
* 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.
2023-10-23 11:09:39 -07:00
Alexander Köplinger
d65a39d659
Only write cmake_cmd_line.txt cache file if cmake succeeded (#93673)
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.
2023-10-18 20:04:23 +02:00
Jackson Schuster
3086d8a1c3
Use add_link_options and target_link_options in cmake (#92844)
Remove `add_linker_flag` and replace with `add_link_options` and `target_link_options` where possible.
2023-10-17 09:53:44 -07:00