-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Q: runtime pal.h declarations #37310
Comments
For example, this is the sort of error we ran into with clang 10: #32837 |
The PAL is trying to emulate Windows for historic reasons. It made the initial port to Unix easy. Definitions of number of functions on Windows are different from equivalent definitions on Unix. It means that we cannot just include system headers because of the definitions would collide. Ideally, we would make this Windows emulator go away. A step in this direction would be to define |
The runtime code on Unix never includes anything from the actual platform, just the The code in PAL implementation also includes the The |
It would be interesting to give this a try to avoid these compiler issues in the future. |
I experimented with this a bit, and came to a better understanding of what type things PAL deals with. 2 examples:
All such cases can be death with, though the effort is higher than what I had imagined. |
I'm confused with the |
|
Thanks,
Uses
I tried adding to
which clears this one, but moves to the next:
Comments in |
These comments are stale. I think you can try putting the whole block of the |
Thanks again, For the SAL stuff, would renaming
And then a bunch of search/replace where they are used be ok? |
I would expect it to be:
Otherwise, sounds good. |
Happy New Year! Ok, back to this, I've made a lot of changes, so hopefully I'm not straying off the path too much. What is the strategy regards the
|
Is it possible to avoid including Of course, it would be also possible to rename |
@jkotas You don't need to introduce new macros, there are already Do you know which CMakeLists.txt should have POC with search and replacing |
Yes, think so. What should I be doing for FILE and PAL_FILE? I think I've got it wrong so want to check
Should |
Yes, PAL |
Thanks, last one for today:
|
It is in pal.h. It may need to be moved outside |
Thanks, the linux jit is now building at least, so the next one is the wasm jit which is different as it brings in the LLVM headers. Going a bit off topic so maybe I should carry on in the runtimelab issues. For
? Error at the moment is
I did try this approach briefly, i.e. in
but:
|
Where is it undefed? I think we should be just picking up the OS definition of errno with |
At
Maybe I shouldn't have included that in compiler.h ...
|
Agree. |
Thanks, do you think all these places where I've included palinternal.h are wrong?:
|
I think palinternal.h should stay internal to the PAL. It should not be included anywhere else. |
Right, |
Where is the actual definition of
And a reference in
But that's just
|
The partial definition in pal.h that I see is:
|
Thanks, I'll move that outside of the |
* Fix pal_assert.h for PAL_STDCPP_COMPAT Improves #37310
It seems that all the questions have been asnwered, closing the issue. |
When updating versions of clang we had some compiler errors due to mismatch in declarations between
pal.h
and system headers (mainly: missingthrow
specifiers). We can fix these issues by makingpal.h
match with the system headers.What is the rationale for having these declaration in pal.h, instead of including system headers?
cc @jkotas @janvorli @omajid
The text was updated successfully, but these errors were encountered: