Skip to content
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

Add MSBuild target to Bootstrap.mak #639

Merged
merged 1 commit into from
Jan 20, 2017
Merged

Conversation

nta
Copy link
Contributor

@nta nta commented Nov 28, 2016

As I mentioned a while ago, Bootstrap.mak will not directly work when no full VS install is present.

This attempts to resolve said issue by adding a separate target (windows-msbuild) to the Makefile.

Another solution would be to handle upgrade behavior based on the MSDEV variable and use msbuild to build in all cases, but this would break (or require conditions, and I'm not too sure how well cross-platform Makefiles like those) for VS2008< which use VCBuild project files rather than the VS2010+ MSBuild .vcxproj w/ toolset configuration, and might potentially cause different behavior for build processes relying on the current windows target.

For VS2010+, there is no functional difference between binaries built by either method (except not specifying an explicit MSDEV argument will default to v110 due to the vs2012 toolchain setting - and these will not be upgraded) as devenv /Build will dispatch to MSBuild for these projects anyway (though handling solution parsing internally, rather than using MSBuild compatibility behavior).

Copy link
Contributor

@tvandijck tvandijck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be awesome if we could somehow do the /Upgrade only if the MSDEV variable isn't specified, other then that this change looks fine to me.

@tvandijck
Copy link
Contributor

Also, I'm not sure how important it really is to keep VS2008 support... I don't even thing premake would build with VS2008 right now. I can test if anyone is interested..

@nta
Copy link
Contributor Author

nta commented Nov 28, 2016

Testing this would indeed be appreciated - if VS2008 is broken this could be simplified to always build using MSBuild and use a batch-style if condition (as done for file existence already, so the windows target depended on nmake anyway) to not upgrade if a specific MSDEV variable is specified.

A more decent solution would be checking environment variables to default to the toolset version that has currently had the vcvars*,bat file run, but within the makefile context that might be a problem.

@tvandijck
Copy link
Contributor

I'll see if I can spin up a VM with VS2008 and give this a shot...

@tvandijck
Copy link
Contributor

OK, finally had the time to check this in a VM with VS2008...

The current codebase does not build with VS2008..
Neither zlib or mbedtls that is embedded in premake compile at all, and the the bootstrap part itself, does not compile due to string_sha1.c's use of <stdint.h>, zlib and mbedtls suffer the same issues. Disabling that however gives me a successful version of premake without zlib or http support.

Quite honestly, I think it is going to be increasingly difficult to keep supporting an 8 year old version of Visual Studio. Certainly now that Visual Studio for non-commercial use is effectively free through the community editions.

We're going to have to decide at some point.... "we gotta move on"..

@starkos
Copy link
Member

starkos commented Dec 9, 2016

FWIW, I'm okay with "gotta move on".

@tvandijck
Copy link
Contributor

@nta @starkos OK, in that case I guess we can just always use MSBuild to build through the bootstrap.

@tvandijck tvandijck merged commit dfcabc1 into premake:master Jan 20, 2017
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.

3 participants