CMake: Include missing modules in druntime/Phobos#1917
CMake: Include missing modules in druntime/Phobos#1917kinke merged 2 commits intoldc-developers:masterfrom
Conversation
|
Could you also push the obvious one-line band-aid to the release branch? The druntime flag changes definitely shouldn't go into the release. |
|
I'm kind of reluctant of adding that particular module as hack for the release just to close that issue early. On Win64, we are talking about 18 additional modules for the |
|
Reason for the (current) CI errors: |
|
After excluding |
|
See dlang/druntime#1709 wrt. |
runtime/CMakeLists.txt
Outdated
| list(APPEND DRUNTIME_D ${DRUNTIME_D_LINUX}) | ||
| elseif(${CMAKE_SYSTEM} MATCHES "SunOS") | ||
| list(APPEND DRUNTIME_D ${DRUNTIME_D_SOLARIS}) | ||
| # TODO: Android (Bionic) |
There was a problem hiding this comment.
@joakim-noah: Can you help out here wrt. detecting a native CMake build on Android?
There was a problem hiding this comment.
I don't think CMake supports such builds well, as it doesn't have any built-in support for native Android compiles and the package I'm using is just compiled similar to linux/ARM. So CMAKE_SYSTEM_NAME and CMAKE_SYSTEM are set to the same as on any linux, ie Linux and the same with the kernel version appended.
I suggest you just add the bionic folder for linux too. It will not affect linux/glibc because its declarations are versioned out and Android isn't bothered by both linux/ and bionic/ being compiled.
There was a problem hiding this comment.
Thanks. You do set CMAKE_SYSTEM_NAME to Android in your build.sh script though, but if that isn't standard, we may as well just include the 2 Bionic modules for Linux generally. My only worries were that they would then show up as tested as part of the unittests, although they may be versioned out. But oh well, they only contain a single declaration each... ;)
There was a problem hiding this comment.
Yes, that is to cross-compile CMake itself for Android. Once that's done, there's no native support in the resulting native Android CMake binary or its scripts. It might as well be linux/ARM from CMake's perspective.
Bionic is versioned out and no tests, only declarations, so no problem.
|
Wrt. the |
|
When radically reducing the signal handler to void sigsegvDataHandler()
{
asm
{
naked;
push RSI; // return address (original RIP).
// Parameter address is already set as RDI.
jmp sigsegvUserspaceProcess;
}
}the exception is thrown correctly. import etc.linux.memoryerror, core.stdc.stdio;
int* getNull() { return null; }
void setNull() { *getNull() = 42; }
void main()
{
registerMemoryErrorHandler();
try
{
//*getNull() = 42;
setNull();
}
catch (NullPointerError)
{
printf("Caught\n");
}
deregisterMemoryErrorHandler();
}But the commented-out code doesn't (unhandled |
dc1d594 to
ff535b8
Compare
|
As I recall reading somewhere that Walter plans to deprecate |
Using exclusively blacklists and no more whitelists (especially for subdirectories) should be way more robust wrt. future restructurings and additions. I also got rid of obsolete existing blacklist entries and removed a hopefully obsolete workaround wrt. disabling invariants for some parts of druntime.
The most urgent linking errors have been fixed upstream by dlang/druntime#1709 in the meantime.
Fixes issue #1915. Using exclusively blacklists and no more whitelists (especially for subdirectories) should be way more robust wrt. future restructurings.
I also got rid of obsolete existing blacklist entries and removed a hopefully obsolete workaround wrt. disabling invariants for some parts of druntime.