-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularllvm:coreplatform:solaris
Description
Despite their common ancestry, Solaris and Illumos have diverged in some areas since Oracle closed the OpenSolaris project more than 10 years ago. Recently, the need to distinguish the too came up in several reviews. Instead of having the information spread over multiple places, I'm collecting them here. Some of this was suggested in D119695:
We should probably follow the model used in Go build tags where solaris is defined for both Solaris and Illumos, while illumos is specific to Illumos. This way considerable code can be shared while handling differences as need be.
- We need a macro (
__illumos__) to distinguish the two. This needs to work both with bundled and vanilla versions ofclangandgcc, so this should be done in two places. - Define
__illumos__based on theuname -ooutput e.g. inllvm/CMakeLists.txt. I have a prototype for that. - Have
clangpredefine it, too. This depends on... - Provide
isOSIllumos()inclang. I'm not yet certain how best to do this, though: normally theisOS*()methods just look at the triple, which is identical between the two. Maybe something likellvm/lib/Support/Unix/Host.inc(updateTripleOSVersion) can be used, but rewriting the triple to*-*-illumoswould mean massive changes to the testsuite, contradicting the model above. - The
cmakefiles use${CMAKE_SYSTEM_NAME} MATCHES "SunOS"tests all over the place. Not sure yet how best to handle this.
We may discover more along the way, though.
Metadata
Metadata
Assignees
Labels
cmakeBuild system in general and CMake in particularBuild system in general and CMake in particularllvm:coreplatform:solaris