Call for 1.10.2 testing: Close BuildLog while running generators; browse tool with CMake

13,382 views
Skip to first unread message

jha...@gmail.com

unread,
Nov 22, 2020, 4:17:55 PM11/22/20
to ninja-build

Hi everyone,

we'd like to release 1.10.2 from current master.

There have been two small changes in this release: The browse tool is now enabled when building with CMake (so it's part of the official binaries again) and it should now work in all circumstances to run the restat tool by the generator on Windows. See https://github.com/ninja-build/ninja/issues/1724#issuecomment-677730694 for why the fix in 1.10.1 wasn't enough.


Please test a build of the master branch with your projects and report any problems. Thanks!

Nico Weber

unread,
Nov 22, 2020, 8:53:09 PM11/22/20
to jha...@gmail.com, ninja-build
If we're doing a new release, would it be possible to provide universal binaries on macOS? What'd be needed for that? (Probably just adding `-arch x86_64 -arch arm64` to cflags and ldflags?)

--
You received this message because you are subscribed to the Google Groups "ninja-build" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ninja-build...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ninja-build/04d002bb-1a15-48f7-8a89-56b3d8a2a215n%40googlegroups.com.

jha...@gmail.com

unread,
Nov 23, 2020, 10:56:14 AM11/23/20
to ninja-build
Good idea! AFAIK `-arch x86_64 -arch arm64` is for Xcode, clang itself will need seperate flags and then the binaries need to merged. Fortunately we can generate an Xcode project with CMake which has support for creating universal binaries:

    cmake -Bbuild-universal -GXcode '-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64'
    cmake --build build-universal --config Release

The resulting binary is fat (I've checked with lipo -info and it's also about double the size than the arm64-only build on my machine).

Unfortunately GitHub Actions defaults to Xcode 11.7 on Big Sur, which doesn't have arm64 support: https://github.com/jhasse/ninja/runs/1442977236
Does anyone have an idea how to switch to 12.2? sudo xcode-select /Applications/Xcode-12.2_beta.app or something?

Note that GitHub Actions is still marking Big Sur as a preview: https://github.com/actions/virtual-environments/issues/1814

Brad King

unread,
Nov 23, 2020, 11:06:56 AM11/23/20
to ninja...@googlegroups.com
On 11/23/2020 10:56 AM, jha...@gmail.com wrote:
> Unfortunately GitHub Actions defaults to Xcode 11.7 on Big Sur, which doesn't have arm64
> Does anyone have an idea how to switch to 12.2? sudo xcode-select /Applications/Xcode-12.2_beta.app or something?

If you know the path to the desired version of Xcode, then you can
either use

sudo xcode-select -s /Applications/Xcode-12.2_beta.app

Or, you can switch just with an environment variable, so long as it
remains visible to all steps:

export DEVELOPER_DIR=/Applications/Xcode-12.2_beta.app/Contents/Developer

-Brad

Brad King

unread,
Nov 23, 2020, 11:12:44 AM11/23/20
to Jan Niklas Hasse, ninja...@googlegroups.com
On 11/22/2020 4:17 PM, Jan wrote:
> we'd like to release 1.10.2 from current master.
>
> Please test a build of the master branch with your projects
> and report any problems. Thanks!

It works for me in nightly builds of CMake and its entire test suite
using a nightly build of ninja's `master` branch. I run one of those
on Windows, macOS, and Linux platforms.

I also just built locally on Windows and hacked the version number
to be 1.10.2, and verified that that log-file-during-generator problem
is fixed.

-Brad

Nico Weber

unread,
Nov 23, 2020, 11:22:43 AM11/23/20
to jha...@gmail.com, ninja-build
I think Xcode 12.2 is stable now.

On Mon, Nov 23, 2020 at 10:56 AM jha...@gmail.com <jha...@gmail.com> wrote:
Good idea! AFAIK `-arch x86_64 -arch arm64` is for Xcode, clang itself will need seperate flags and then the binaries need to merged.

No, the clang driver knows to spawn one cc1 process for each arch and then lipo them together transparently as far as I know.
 

jha...@gmail.com

unread,
Nov 23, 2020, 11:35:02 AM11/23/20
to ninja-build
@Brad: Thanks, switching with xcode-select -s worked. Also good to hear that the log-file-during-generator problem is now gone, thanks for testing.

On Monday, 23 November 2020 at 17:22:43 UTC+1 Nico Weber wrote:
No, the clang driver knows to spawn one cc1 process for each arch and then lipo them together transparently as far as I know.

You're right, the following works perfectly, too:

    CXXFLAGS='-arch x86_64 -arch arm64' ./configure.py
    ninja


I've sticked with the CMAKE_OSX_ARCHITECTURES method for GitHub Actions and the master branch builds a fat binary now (size is about 600 KB instead of ~300 KB). I can not test the binary on my ARM Mac though due to https://github.com/ninja-build/ninja/issues/1695 :/
Reply all
Reply to author
Forward
0 new messages