Repository navigation
Fix Linux x86 build - #50836
Fix Linux x86 build#50836
Conversation
|
Tagging subscribers to this area: @hoyosjs Issue DetailsAfter this change next subsets can be built: Related issue: #40003 cc @alpencolt
|
255716d to
70ae805
Compare
There was a problem hiding this comment.
I am not sure why alignment to 8 is needed. I would rather expect DAC_ALIGNAS(IMetaModelCommonRO).
There was a problem hiding this comment.
In src/coreclr/md/inc/VerifyLayouts.inc there's a 8byte alignment check for m_Schema:
BEGIN_TYPE(CMiniMdBase, 8) //vtable ptr and first field 8-byte alignment
ALIGN_FIELD(CMiniMdBase, m_Schema, sizeof(CMiniMdSchema), 8)
This check started to fail after recent changes to CMiniMdBase and CMiniMdSchema, where new class fields were added. So, I've added explicit 8 byte alignment
70ae805 to
c6ae5b0
Compare
|
In general this looks reasonable to me. Adding @janvorli as one of the few people familiar with our pre-existing runtime support for Linux x86. Once this PR has been resolved against the current runtime main and demonstrated passing PR testing, I believe it to be ready to be merged in. |
2c60c01 to
2f475ef
Compare
|
Rebased with some additional changes after #49906 |
There was a problem hiding this comment.
I don't think these need the FALLTHROUGH, call you please remove them here?
There was a problem hiding this comment.
Thanks, I'll remove this
There was a problem hiding this comment.
What is the reason for moving this method out of the header?
There was a problem hiding this comment.
This is also related to access to FieldDesc on linux x86 in IsArgumentInRegister. Otherwise, there are build errors with SetStaticOBJECTREF defined in header, since now "field.h" is included in "common.h"
There was a problem hiding this comment.
I don't understand the reason for switching some of the helpers calling convention. Can you please explain the purpose of these changes?
There was a problem hiding this comment.
Calling convention doesn't change here. Actual problem is incorrect usage of HCCALL3 macro: it should be used to call function. HCIMPL3_RAW should be used for declaration instead.
There was a problem hiding this comment.
Which part of the change needs to have the field.h include here?
There was a problem hiding this comment.
This is required on linux x86, because IsArgumentInRegister accesses FieldDesc. Otherwise:
/home/z/Dev/runtime3/src/coreclr/binder/../vm/callingconvention.h:416:46: error: member access into incomplete type 'FieldDesc'
CorElementType type = pFD->GetFieldType();
There was a problem hiding this comment.
Can you please instead move the #include "frames.h" above the #include "field.h" and revert the change in field.h and field.cpp? I've verified it compiles fine on x86 Linux that way.
There was a problem hiding this comment.
I still get the original build error this way, because "frames.h" itself includes "callingconvention.h", which requires "field.h" on x86. So, if "frames.h" is above "field.h" there still is error: member access into incomplete type 'FieldDesc'
There was a problem hiding this comment.
Ah, I am sorry, I've found I've forgotten to add "cross" to my command line when trying to build for x86. Please keep it as you had it.
There was a problem hiding this comment.
Yes, it is ok. We preffer to just use default calling convention whenever possible.
2f475ef to
5fac123
Compare
5fac123 to
37717f6
Compare
|
Can this be merged? |
|
@gbalykov the libraries tests are failing on Windows x86 in this PR, it might be related. Let me re-run them to see. |
37717f6 to
218272b
Compare
218272b to
6c63f03
Compare
|
@janvorli I've rebased on latest master, test fails don't seem to be related, am I right? |
|
@gbalykov right, they are in unrelated. |
|
Thanks! |
After this change next subsets can be built:
clr.runtime+clr.corelib+clr.iltools+clr.dactools+clr.jitRelated issue: #40003
cc @alpencolt