-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…t with LTO, fix a static initialization order issue Summary: LLVM 13 and LLVM 14 have been released and we need to update our code accordingly. [#10852] Also allowing the use of third-party packages built with LTO. LTO type becomes part of the build directory name, replacing `dynamic` with `thin-lto` or `full-lto`. It can also be controlled using the YB_LINKING_TYPE environment variable. To build with LTO, specify e.g. `./yb_build.sh --lto full`. thirdparty_tool has been updated to understand the LTO-related part of third-party package tags. Also found an ASAN issue, #10880, caused by indeterminate order of static initialization, which manifests itself on Clang 13 and Clang 14. Fixed by using plain-old arrays of enum values and adding an iterator wrapper on top of that. Had to replace `atomic_flag` with `atomic<bool>` for the `outstanding_report_failure_task_` field (used to be `std::atomic_flag outstanding_report_failure_task_ = ATOMIC_FLAG_INIT;`) because ATOMIC_FLAG_INIT is deprecated in newer libc++ versions, but its absence silently produces incorrect behavior (initialization with a garbage value) in older versions of libc++, so it is better to avoid it altogether. Additional third-party packages being added also include Amazon Linux 2. [#12312] Updated mac_library_packager.py to avoid assuming that the additional libraries required by Postgres are in the `installed/common` directory. Some of them have moved to `installed/uninstrumented`. Test Plan: Jenkins Build the code with Clang 13 and Clang 14 on an AlmaLinux 8 under x86_64 and aarch64. Build types: debug, release, fastdebug, asan, tsan. Reviewers: steve.varnau, sergei Reviewed By: sergei Subscribers: bogdan, ybase Differential Revision: https://phabricator.dev.yugabyte.com/D14326
- Loading branch information
Showing
37 changed files
with
722 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.