-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reorganize libs.native #61958
Reorganize libs.native #61958
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
@jkotas, @carlossanlop, with this structure, there is no Unix, Windows and AnyOS subdirectories anymore and @safern, @jkoritzinsky, I've moved |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for doing this.
I was hoping that the shims can be directly in the native
directory, but I understand why you have put them native/libs
and I do not have a better suggestion. So LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@am11 @jkotas - For my own education, can you please confirm if I'm understanding the changes in this PR correctly? Please correct me if I got something wrong:
All the native code is built using the same cmake script(s), but depending on the OS, we choose which code files to build for that OS:
- Th
pal_*.c|.h
files contain syscalls that only apply to Unix and WASM.. - The
zlib
stuff is cross-platform, and could be built in any OS, but we currently only consume it in Windows, but maybe in the future it could be consumed by others. - The new structure will be clearer and will avoid future confusion like when I recently asked why zlib lived inside the Windows folder.
At first glance the changes look good to me, but I'm far from being the expert in cmake stuff, so I'll defer the decision to merge to @jkotas.
That's right. The cmake configuration are now unified, to make it easier to enable which sources to compile without changing the directory structure. This simplifies things; no more indirections and conditions outside the cmake script.
Currently these utility headers are only used by Unix. When a source file which compiles on Windows require them, we can sprinkle around some
Yup, enabling zlib compile-from-src will be a matter of hoisting these lists https://github.com/dotnet/runtime/blob/92854b914abe1ca2796ffc6c0abf3a076b222313/src/native/libs/System.IO.Compression.Native/CMakeLists.txt#L115
it might be possible to converge to one (less) flavor. (cc @lambdageek, @akoeplinger) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than some adjustments on the evaluate path subsets, looks good to me.
Oh I didn't know there was also a separate zlib in mono. I'll share this info in my PR: #61883 |
a425775
to
7596004
Compare
@am11 I was curious at what we saw previously that we needed to add >> git diff
@@ -1,6 +1,6 @@
#ifndef __DIAGNOSTICS_DUMP_PROTOCOL_H__
#define __DIAGNOSTICS_DUMP_PROTOCOL_H__
-
+// change
#include "ds-rt-config.h"
#ifdef ENABLE_PERFTRACING >> eng/pipelines/evaluate-changed-paths.sh --azurevariable containsChange --difftarget dotnet/main --subset coreclr --includepaths 'src/libraries/System.Private.CoreLib/*+src/native/libs/Common/*+src/native/libs/System.Globalization.Native/*+src/native/libs/System.IO.Compression.Native/*' --excludepaths 'eng/Version.Details.xml+*.md+LICENSE.TXT+PATENTS.TXT+THIRD-PARTY-NOTICES.TXT+docs/*+src/installer/*+src/mono/*+src/libraries/*+src/native/libs/*+src/tests/*+eng/pipelines/installer/*+eng/pipelines/mono/*+eng/pipelines/libraries/*'
******* Probing coreclr exclude paths *******
eng/Version.Details.xml
*.md
LICENSE.TXT
PATENTS.TXT
THIRD-PARTY-NOTICES.TXT
docs/*
src/installer/*
src/mono/*
src/libraries/*
src/native/libs/*
src/tests/*
eng/pipelines/installer/*
eng/pipelines/mono/*
eng/pipelines/libraries/*
+ git diff -M -C -b --ignore-cr-at-eol --ignore-space-at-eol --exit-code --quiet dotnet/main -- ':!eng/Version.Details.xml' ':!*.md' ':!LICENSE.TXT' ':!PATENTS.TXT' ':!THIRD-PARTY-NOTICES.TXT' ':!docs/*' ':!src/installer/*' ':!src/mono/*' ':!src/libraries/*' ':!src/native/libs/*' ':!src/tests/*' ':!eng/pipelines/installer/*' ':!eng/pipelines/mono/*' ':!eng/pipelines/libraries/*'
----- Matching files for coreclr -----
+ git diff -M -C -b --ignore-cr-at-eol --ignore-space-at-eol --name-only dotnet/main -- ':!eng/Version.Details.xml' ':!*.md' ':!LICENSE.TXT' ':!PATENTS.TXT' ':!THIRD-PARTY-NOTICES.TXT' ':!docs/*' ':!src/installer/*' ':!src/mono/*' ':!src/libraries/*' ':!src/native/libs/*' ':!src/tests/*' ':!eng/pipelines/installer/*' ':!eng/pipelines/mono/*' ':!eng/pipelines/libraries/*'
src/native/eventpipe/ds-dump-protocol.h
Setting pipeline variable containsChange=true
##vso[task.setvariable variable=containsChange;isSecret=false;isOutput=true]true |
Thanks for checking it, @safern. Currently all jobs that are conditioned on |
I think it is safe to leave it as is, I don't want to end on a world where every include path needs to be listed, unless we have a subset like the jit subset where only want to include certain paths and exclude the rest, so we implicitly include them and not exclude any paths. |
FSW test failure on OSX is unrelated to changes. |
If everything looks good, can this get merged? My PR #61883 is currently blocked by this change. |
Fixes #61864.