You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assembly files should not be compiled as C and instead use CMake's assembly language support to allow for vendors and users to specify flags, compiler options, use a different executable, have correct architecture flags, interact properly with toolchain files, etc.
The compiler-rt ARM64 outline atomic helpers are a new and the only case of this improper usage in the codebase.
It seems these should use the already-existing compiler-rt add_asm_sources() helper.
Previous occurrences of this were fixed by 45344cf. The improper usage resulted in multiple reports from users and vendors, requiring a backport to resolve build issues.
It would be best to avoid a recurrence of the problems. Marking as a release blocker due to this.
Pavel, could you take a look at this?
The text was updated successfully, but these errors were encountered:
I am using just C preprocessor to generate outline atomic helpers from lse.S. Then generated assembly files are added to aarch64_SOURCES along with other asm (aarch64/chkstk.S for example) and С sources to compile. There are a lot of *.S files used as sources for compilation as well (see *_SOURCES in compiler-rt/lib/builtins/CMakeLists.txt). Could you clarify is it something APPLE specific and I should use add_asm_sources() in 'if (APPLE)' case?
I am using just C preprocessor to generate outline atomic helpers from lse.S. Then generated assembly files are added to aarch64_SOURCES along with other asm (aarch64/chkstk.S for example) and С sources to compile. There are a lot of *.S files used as sources for compilation as well (see *_SOURCES in compiler-rt/lib/builtins/CMakeLists.txt).
Apologies, I should've read the code more carefully.
Nevertheless, passing CMAKE_C_FLAGS to the preprocessor isn't too good. In my case CMAKE_C_FLAGS contains processor-specific options (i.e. -mcpu=carmel) resulting in tons of warnings. I can imagine other vendors having options meant for compiling that will similarly result in warnings or even errors when only preprocessing.
Preprocessing separately seems unnecessary in addition to making things more fragile and complicated.
It seems it'd be simpler to simply symlink and compile each symlink with the definitions.
Extended Description
Assembly files should not be compiled as C and instead use CMake's assembly language support to allow for vendors and users to specify flags, compiler options, use a different executable, have correct architecture flags, interact properly with toolchain files, etc.
The compiler-rt ARM64 outline atomic helpers are a new and the only case of this improper usage in the codebase.
It seems these should use the already-existing compiler-rt add_asm_sources() helper.
Previous occurrences of this were fixed by 45344cf. The improper usage resulted in multiple reports from users and vendors, requiring a backport to resolve build issues.
It would be best to avoid a recurrence of the problems. Marking as a release blocker due to this.
Pavel, could you take a look at this?
The text was updated successfully, but these errors were encountered: