ChakraCore icon indicating copy to clipboard operation
ChakraCore copied to clipboard

Partially enable build with GCC: PAL and WABT

Open curtisman opened this issue 4 years ago • 4 comments

PAL and WABT directory can build with GCC with this change.

  • Add compiler detection in CMakeList.txt in the root and wabt
    • Separate out CLANG specific switches.
  • Update some of the PAL code to match what is the current dotnet version
    • Macro redirects: DECLSPEC_ALIGN, PAL_NORETURN, __forceinline
    • type definition M128A,PM128A
    • BitScan*
    • Interlock* (which has the Arm64 barrier code, and the updated built-in for InterlockedExchange to use __atomic_exchange_n
    • Remove the OSX/BSD specific version of memmove. Not sure why that is necessary in the first place, because memmove should handle overlapping buffer already.
  • Replace all __declspec(noreturn) to DECLSPEC_NORETURN
  • Fix the macro in JnHelperMethodList.h to not have the trailing ## if there is nothing to concat

curtisman avatar Feb 15 '21 18:02 curtisman

@rhuanjl I am curious about pulling this in, aside from being large, the change looks relatively straightforward.

We need to rebuild though - build history already expired :)

ppenzin avatar Jul 13 '21 03:07 ppenzin

@rhuanjl I am curious about pulling this in, aside from being large, the change looks relatively straightforward.

We need to rebuild though - build history already expired :)

Some of the typedef changes don't work on macOS so we'll need to sort that other than that two things: a) it's incomplete (though we could take it any way and progress from here) b) need to ask @curtisman if his work here is covered by the existing license

rhuanjl avatar Jul 13 '21 20:07 rhuanjl

@rhuanjl a) yeah.. I don't have a macOS to work thru the build issues. Someone will have to take the change and work on it a bit. b) the existing files in the PAL directory has their origin from the dotnet version here previously. Some of the updated in this change are to sync up the two. They are both licensed as MIT (and copyrighted MS), so I am not 100% whether addition license language needed to be added there. Otherwise, there is no addition license requirements.

curtisman avatar Aug 25 '21 18:08 curtisman

Thanks @curtisman I'll pull it down and see if i can fix the macOS issues later this week.

rhuanjl avatar Aug 31 '21 06:08 rhuanjl