Repository navigation
Adding Versioning to Native components in non-Windows builds. - #4393
Conversation
| :CollectMsbuildArgs | ||
| shift | ||
| if "%1"=="" goto ArgsDone | ||
| if /i [%1] == [/p:OfficialBuildId] ( |
There was a problem hiding this comment.
As we chatted we want to do this as a separate step from the normal build flow so please make sure we track that work item.
There was a problem hiding this comment.
Issue #4395 will track that.
|
cc: @ellismg |
|
It seems we can make the change localized instead of making it distributed over many CMakeLists.txt files. Recent change from @rahku (you'll need to update your sources to get it) has introduced wrappers around add_executable and add_library where we can add the version sources in a centralized manner. |
| set(CLR_DIR ${CMAKE_CURRENT_SOURCE_DIR}) | ||
| set(VM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/vm) | ||
| set(GENERATED_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/src/inc) | ||
| set(VERSION_FILE_PATH "${CMAKE_BINARY_DIR}/../version.c") |
There was a problem hiding this comment.
I think we should generate the version file to the CMAKE_BINARY_DIR directly, not one level below. All generated files for a configuration (release, debug, ...) should be contained to the CMAKE_BINARY_DIR.
There was a problem hiding this comment.
makes sense, I'll change this.
I'm testing out the changes right now in my OSX and my Ubuntu box using Rahul's wrappers. If that passes then I'll rebase and update this PR. Thanks for the suggestion! |
e3c424e to
25b7a5d
Compare
| ) | ||
|
|
||
| add_library(coreclrpal | ||
| _add_library(coreclrpal |
There was a problem hiding this comment.
This adds a static library, I don't think you want to add version to that, since this library gets linked into most of the shared libs. You would end up with the version stuff being twice in them.
There was a problem hiding this comment.
sounds good I'll remove it from there.
|
LGTM |
|
Merging now since it looks like OSX CI machines are down, and I have validated in my own OSX box that the code works. |
…/coreclr#4393) Adding Versioning to Native components in non-Windows builds. Commit migrated from dotnet/coreclr@250a206
Adding Versioning to Native components in non-Windows builds.
cc: @weshaggard @gkhanna79
fixes: #3133