Skip to content

DO NOT MERGE [build-script] Flip the default value of legacy_impl #21020

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

benlangmuir
Copy link
Contributor

Experimenting with whether this code still works.

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test

@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@swift-ci
Copy link
Contributor

swift-ci commented Dec 4, 2018

Build failed
Swift Test Linux Platform
Git Sha - e46b195c366f0a05609233a4121bbd375979d387

@benlangmuir
Copy link
Contributor Author

UnicodeNormalization.cpp.o:UnicodeNormalization.cpp:function _swift_stdlib_unicode_strToUpper: error: undefined reference to 'u_strToUpper_55'

Looks like the libicu config is trying to add to the swift cmake config in build-script-impl, which doesn't work if we don't configure them at the same time.

https://github.com/apple/swift/blob/8e38173884766d73df552a77127bc39fc5ea35c0/utils/build-script-impl#L2804-L2811

@swift-ci
Copy link
Contributor

swift-ci commented Dec 5, 2018

Build failed
Swift Test OS X Platform
Git Sha - e46b195c366f0a05609233a4121bbd375979d387

@benlangmuir
Copy link
Contributor Author

17:38:10 Traceback (most recent call last):
17:38:10 File "/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/lldb/scripts/Xcode/build-llvm.py", line 445, in
17:38:10 build_llvm_if_needed()
17:38:10 File "/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/lldb/scripts/Xcode/build-llvm.py", line 438, in build_llvm_if_needed
17:38:10 build_llvm()
17:38:10 File "/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/lldb/scripts/Xcode/build-llvm.py", line 430, in build_llvm
17:38:10 build_script_path()] + build_script_flags(),
17:38:10 File "/Users/buildnode/jenkins/workspace/swift-PR-osx-smoke-test/branch-master/lldb/scripts/Xcode/build-llvm.py", line 410, in build_script_flags
17:38:10 return BUILD_SCRIPT_FLAGS()[lldb_configuration(
17:38:10 KeyError: 'BuildAndIntegration'
17:38:10 Command /bin/sh failed with exit code 1
17:38:10
17:38:10 ** BUILD FAILED **

Looks like lldb is also leaking configuration variables between steps.

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please test macOS

@swift-ci
Copy link
Contributor

swift-ci commented Dec 6, 2018

Build failed
Swift Test OS X Platform
Git Sha - e46b195c366f0a05609233a4121bbd375979d387

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

1 similar comment
@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

1 similar comment
@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please smoke test Linux

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e46b195c366f0a05609233a4121bbd375979d387

@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 447ec0951e0878f6fc184fada0797341a5707e5e

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ae1665c7c26c10d0eea45d79cd6b48b30ef673e4

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please test Linux

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ecc8601f8a8530a552c0a457f77bdb3f290c3c59

@benlangmuir
Copy link
Contributor Author

@swift-ci please test Linux

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ecc8601f8a8530a552c0a457f77bdb3f290c3c59

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain macOS

@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain Linux

@swiftlang swiftlang deleted a comment from swift-ci Dec 13, 2018
@swiftlang swiftlang deleted a comment from swift-ci Dec 13, 2018
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@swiftlang swiftlang deleted a comment from swift-ci Dec 14, 2018
@swiftlang swiftlang deleted a comment from swift-ci Dec 14, 2018
@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain

@benlangmuir
Copy link
Contributor Author

(don't know why the status isn't updated, but the toolchain builds passed too)

Turns on the `--no-legacy-impl` option to build-script by default; the
old behaviour is temporarily still available as `--legacy-impl`.

This causes build-script to invoke build-script-impl for every
individual build/test/install/etc. action rather than a single global
invocation. For example, a single invocation might be for
`macosx-swift-install`. This will enable the python code in build-script
to drive the overall process and add additional steps in between actions
without the involvement of build-script-impl. It also provides a path to
refactoring the existing actions out of build-script-impl individually.

Discussed as part of https://forums.swift.org/t/rfc-building-swift-packages-in-build-script/18920

The --no-legacy-impl flag was originally disabled by default because of
concerns about the performance of null builds due to the increased
number of script invocations. There is a small optimization in this
commit to use `tr` when processing command-line options instead of
bash's builtin substitution, which eliminates most of the overhead.
After this change, a null build of llvm+swift changes from 1.6 s to
2.1 s on Linux, and from 5 s to 6 s on macOS.  Non-null builds and
builds that involve more build products than just llvm+swift (e.g.
corelibs) are basically unaffected since they are not correctly
incremental to begin with.

The changes to build-script-impl in this commit are to fix the behaviour
of --no-legacy-impl, which had bitrotted since it was introduced. These
changes are to make various parts of the script not rely on variables
defined in "earlier" parts of the script, which is good hygiene in
general.
@benlangmuir
Copy link
Contributor Author

@swift-ci please test

@benlangmuir
Copy link
Contributor Author

@swift-ci please build toolchain

@swiftlang swiftlang deleted a comment from swift-ci Jan 10, 2019
@swiftlang swiftlang deleted a comment from swift-ci Jan 10, 2019
@benlangmuir
Copy link
Contributor Author

Closing in favour of #21772

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants