for sib/sibgen files for libraries without building them by default.
This will let engineers just cd into the build directory and type:
ninja swift-stdlib-sib
ninja swift-stdlib-sibgen
To generate sib and sibgen files respectively.
There are still some dependency issues in between the sib targets, so to get
this to work well, I would suggest doing a full build and then using these
targets.
In PR 5182 I broke the Xcode generator in cases where the output path had ${CMAKE_CFG_INTDIR} in it. This broke because $(CONFIGURATION) is invalid in the name of a target.
Since all targets will have the same value for CMAKE_BINARY_DIR and CMAKE_CFG_INTDIR we can remove those from the target names and still have unique values.
This has the impact of shortening the generated target names so that the filename components are unlikely to hit OS limits using IDE generators where CMake generates Makefiles or scripts for custom commands. It also retains the debug ability that PR 5182 was attempting to add.
This code was added in the mega-commit 6670bb7 with the commit message "Rewrite the CMake build system", so I'm a little bit light on context here. The comment in the code was:
# Construct a unique name for the custom target.
# Use a hash so that the file name does not push the OS limits for filename
# length.
This seems bunk to me. Since the string being hashed is a filename it seems to me that we don't need a hash to stay under the OS filename size limits. Additionally since output files must be unique using the filename as the unique target name seems like a good idea to me. The only issue here is that custom target names can't contain '/'s. To workaround that we replace the '/' character with '-'.
This patch has the added benefit of having the full filename encoded into the target names, so if you need to debug the build dependency graph you can much more easily walk back from the generated build files to the place in CMake where it was generated.
Enable CMake policy CMP0057, which allows `if()` statements to use the `IN_LIST`
operator. In addition, simplify several `if()` statements that used the
`list(FIND ...)` operation instead.
This flag disables the generation of dependency targets that are necessary to accurately rebuild Swift code, but which completely tank the Xcode IDE experience. Since Xcode is primarily useful as a source editor/navigator for the compiler C++ code, and Ninja is a more performant and featureful build system for Swift at this point, provide a mode that generates enough of an Xcode project to edit the Swift compiler source, but which can't build it, as a compromise so we can use Xcode's editor alongside a Ninja build environment.
Swift SVN r24186