Page MenuHomeWildfire Games

Target build version explicitly for Xcode
Needs RevisionPublic

Authored by Stan on May 5 2018, 7:00 PM.

Details

Summary

This makes Xcode project target 10.8 by default, instead of the latest OSX (which may actually be more recent than what is running on the host).

(adding you Vladislav, I believe you have OS X)

Test Plan

Somebody on OSX should review this.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 6490
Build 10741: Vulcan BuildJenkins

Event Timeline

wraitii created this revision.May 5 2018, 7:00 PM
Owners added a subscriber: Restricted Owners Package.May 5 2018, 7:00 PM
Vulcan added a subscriber: Vulcan.May 5 2018, 7:05 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/461/display/redirect

You need to update premake4.lua too, no?

Also we shouldn't forget to update our wiki too.

Itms requested changes to this revision.Sun, Dec 2, 3:04 PM

This should use premake5.lua's macosx-version-min variable in order to avoid hardcoding. With D1685, this will actually be 10.9.

premake4 can be ignored, because macOS compilation is only well tested with premake5 as of A23, and D1275 is around the corner.

This revision now requires changes to proceed.Sun, Dec 2, 3:04 PM
Stan commandeered this revision.Sun, Dec 2, 8:43 PM
Stan updated this revision to Diff 7022.
Stan added a reviewer: wraitii.

Getting this right doesn't seem like it would hurt the A23 re release was it to be included, right @Itms ?

Stan retitled this revision from Target 10.8 explicitly for Xcode to Target build version explicitly for Xcode.Sun, Dec 2, 8:46 PM
Vulcan added a comment.Sun, Dec 2, 8:48 PM

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/812/

Itms requested changes to this revision.Sun, Dec 2, 9:11 PM

I agree, but I think you didn't test this? The option must be accessed with _OPTIONS (see the other use of it in the file for an example) and I suggest running the whole premake script with and without the parameter passed.

This revision now requires changes to proceed.Sun, Dec 2, 9:11 PM
Stan planned changes to this revision.Sun, Dec 2, 9:25 PM

I assumed we should use premake variable because options might be undefined.

-- On OS X, sometimes we need to specify the minimum API version to use
			if _OPTIONS["macosx-version-min"] then
				buildoptions { "-mmacosx-version-min=" .. _OPTIONS["macosx-version-min"] }
				-- clang and llvm-gcc look at mmacosx-version-min to determine link target
				-- and CRT version, and use it to set the macosx_version_min linker flag
				linkoptions { "-mmacosx-version-min=" .. _OPTIONS["macosx-version-min"] }
			end
Stan updated this revision to Diff 7026.Sun, Dec 2, 10:40 PM

Use the correct option, check if it is set before using it.

Successful build - Chance fights ever on the side of the prudent.

Link to build: https://jenkins.wildfiregames.com/job/differential/813/

Itms requested changes to this revision.Mon, Dec 3, 11:56 AM

The patch is currently useless, because xcodebuildsettings was added in premake5 alpha12 (we have alpha10): see https://github.com/premake/premake-core/wiki/xcodebuildsettings.

So this should be bumped to A24. At that point, D1685 will be in, so this patch should be rebased and pass --macosx-version-min="${MIN_OSX_VERSION}" to premake when generating the xcode workspaces.

This revision now requires changes to proceed.Mon, Dec 3, 11:56 AM