Today, when you enable ASAN, build-script just reconfigures your normal build
directory to use ASAN. This forces you to recompile LLVM and Swift with ASAN
enabled and then (once you have finished using ASAN) to recompile LLVm/Swift
without ASAN.
By using a different build-directory, one still has to (potentially) recompile
LLVM/Swift, but one's original directory has not become invalidated. Thus when
you switch back to a normal build, one does not have to recompile LLVM and
(potentially) Swift!
I put in a small little kludge to add support for this. The better solution is
to refactor the supports_benchmark property from Platform to Target. We
already have a similar abstraction problem with armv7 target on Darwin, where we
explicitly turn off benchmarking.
*NOTE* Building the benchmarks for linux still requires more cmake work. I am
making some changes in a subsequent commit series to do this. If you try to
compile the benchmarks, you will hit an error where ninja says that it doesn't
know about the swift-benchmark-linux-x86_64 target.
build-script-impl assumes ICU is located at
```
LIBICU_SOURCE_DIR="${WORKSPACE}/icu"
```
However, build-script would try to set it to
```
<path-to-workspace>/libicu"
```
This is wrong, so fix it
Some cmark CMake stuff changed recently and the default rules
we have in the Python build script code doesn't behave correctly
anymore, likely because it was relying on incorrect settings.
Now, by default, if the cmark build type isn't specified, it will
follow Swift's. If we don't do this, Xcode builds are broken, and
building with Xcode is important.
This should help speed up people trying to compile the standard library and do
SILGen work. *NOTE* This will not necessarily result in a type checker that is
as fast as a release build since most likely the type checker will use some
link_once odr functions that are debug. But it should still be significantly
faster otherwise.
This makes getting to SILGen take 16 seconds on my machine instead of forever
when compiling with everything else in the compiler in debug mode.
lock is not initialized. Thus, we initialize the lock to None and just
don't use it because no console output can happen in parallel because
we're not running in parallel.
There is no reason not to do this (and it is really cheap) and I want to make
some scripts use it with various clang tooling techniques like clang-tidy to
improve code quality. This will ensure that by default people can just use these
scripts without knowing about how things are working under the hood.
I always forget the exact python invocation to run this test and I am sure
others do as well... so why not just write a script that always remembers it?
- Add --libicu option to compile icu from source. This allows the
configuration to be controlled so that it is enabled for shared
and static building and the static files dont require the use of
the dynamic loader
- Add --install-libicu option to install the shared libraries into
$prefix/lib/swift and the static ones into $prefix/lib/swift_static.
This avoids interference with system installed versions
- Dont use find_package if building ICU from source