-
Notifications
You must be signed in to change notification settings - Fork 367
Use CMake variables set in triplet for abi instead of hashing the triplet file #800
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
Draft
Alexander Neumann (Neumann-A)
wants to merge
30
commits into
microsoft:main
Choose a base branch
from
Neumann-A:hash_variables_using_trace
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
24db2f7
WIP parse trace output
Neumann-A f30615c
json parser complete
Neumann-A 75f3345
WIP; next todo: loop over call blocks.
Neumann-A 8eeb0f1
fill lookup table
Neumann-A 73a2c24
prepare for abi tag generation
Neumann-A cc6e7d9
fix build error after lookup table change
Neumann-A 0fcc43b
fix build
Neumann-A 1ac7513
create abi entries.
Neumann-A 45a816d
rip out triplet hashing, rename triplet_abi -> toolchain_abi
Neumann-A bb72c57
rename variable to make ci happy
Neumann-A 566780d
bit of cleanup
Neumann-A 7c42d7a
fix vcpkg-test
Neumann-A 8a4621c
leave comment about x-cmake-args
Neumann-A b4be9a3
flatten vector to simple string; WIP: record other variable changing …
Neumann-A 71a602f
formating
Neumann-A 6a6262d
move line endings
Neumann-A 58110cf
apply format
Neumann-A e538902
add numeric include
Neumann-A 22e2fa5
Merge remote-tracking branch 'upstream/main' into hash_variables_usin…
Neumann-A 2514ee2
need some newlines for linux so that trace output info doesn't break …
Neumann-A 34b0166
set load_vcvars_env to false for !windows
Neumann-A 3a2426d
apply format
Neumann-A 124f694
fix e2e test
Neumann-A 73fd28d
rename define to use _WIN32 as the rest of the code
Neumann-A 20b1826
more cases and bug fixes
Neumann-A aec5d21
e2e test
Neumann-A 06c3a1c
apply diff
Neumann-A 0d554f5
fix test
Neumann-A 0f6c70d
set VCPKG_CMAKE_SYSTEM_NAME for e2e test on platforms !windows
Neumann-A 5aeafa6
fix osx triplet
Neumann-A File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| nothing to see here |
53 changes: 53 additions & 0 deletions
53
azure-pipelines/e2e_ports/triplet-abi/vcpkg-test-triplet-abi/expected-abi.txt
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| ENV{NOTPATH} unset(ENV{NOTPATH}) | ||
| EXE_ERR_VAR execute_process(COMMAND;echo;Hello;OUTPUT_VARIABLE;EXE_OUT_VAR;RESULT_VARIABLE;EXE_RES_VAR;ERROR_VARIABLE;EXE_ERR_VAR) | ||
| EXE_OUT_VAR execute_process(COMMAND;echo;Hello;OUTPUT_VARIABLE;EXE_OUT_VAR;RESULT_VARIABLE;EXE_RES_VAR;ERROR_VARIABLE;EXE_ERR_VAR) | ||
| EXE_RES_VAR execute_process(COMMAND;echo;Hello;OUTPUT_VARIABLE;EXE_OUT_VAR;RESULT_VARIABLE;EXE_RES_VAR;ERROR_VARIABLE;EXE_ERR_VAR) | ||
| FILE_CMAKE_VAR file(TO_CMAKE_PATH;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_CMAKE_VAR) | ||
| FILE_GLOB_VAR file(GLOB;FILE_GLOB_VAR;*) | ||
| FILE_HASH_VAR file(SHA512;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_HASH_VAR) | ||
| FILE_READ_VAR file(READ;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_READ_VAR) | ||
| FILE_REAL_VAR file(REAL_PATH;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_REAL_VAR) | ||
| FILE_REL_VAR file(RELATIVE_PATH;FILE_REL_VAR;${CMAKE_CURRENT_LIST_DIR};${CMAKE_CURRENT_LIST_DIR}/file-to-read) | ||
| FILE_SIZE_VAR file(SIZE;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_SIZE_VAR) | ||
| FILE_STRINGS_VAR file(STRINGS;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_STRINGS_VAR) | ||
| FILE_TIMESTAMP_VAR file(TIMESTAMP;${CMAKE_CURRENT_LIST_DIR}/file-to-read;FILE_TIMESTAMP_VAR) | ||
| FIND_VAR find_program(FIND_VAR;NAMES;gcc) | ||
| GET_VAR get_directory_property(GET_VAR;VARIABLES) | ||
| JSON_ERR_VAR string(JSON;JSON_VAR;ERROR_VARIABLE;JSON_ERR_VAR;GET;{\"test\": true};test) | ||
| JSON_VAR string(JSON;JSON_VAR;ERROR_VARIABLE;JSON_ERR_VAR;GET;{\"test\": true};test) | ||
| LIST_OUT_VAR list(POP_BACK;LIST_VAR;LIST_OUT_VAR) | ||
| LIST_VAR list(POP_BACK;LIST_VAR;LIST_OUT_VAR) | ||
| LIST_VAR2 list(APPEND;LIST_VAR2;e1;e2;e3) | ||
| MATH_VAR math(EXPR;MATH_VAR;1 + 1) | ||
| OPT_VAR option(OPT_VAR;TEXT;OFF) | ||
| PATH_CONVERT_VAR cmake_path(CONVERT;$ENV{PATH};TO_CMAKE_PATH_LIST;PATH_CONVERT_VAR) | ||
| PATH_HASH_VAR cmake_path(HASH;PATH_VAR;PATH_HASH_VAR) | ||
| PATH_HAS_VAR cmake_path(HAS_EXTENSION;PATH_VAR;PATH_HAS_VAR) | ||
| PATH_IS_VAR cmake_path(IS_RELATIVE;PATH_VAR;PATH_IS_VAR) | ||
| PATH_NATIVE_VAR cmake_path(NATIVE_PATH;PATH_VAR;PATH_NATIVE_VAR) | ||
| PATH_NORMAL_VAR cmake_path(NORMAL_PATH;PATH_VAR;OUTPUT_VARIABLE;PATH_NORMAL_VAR) | ||
| PATH_REMOVE_VAR cmake_path(REMOVE_FILENAME;PATH_VAR;OUTPUT_VARIABLE;PATH_REMOVE_VAR) | ||
| PATH_ROOT_VAR cmake_path(GET;PATH_VAR;ROOT_NAME;PATH_ROOT_VAR) | ||
| PATH_VAR cmake_path(SET;PATH_VAR;i/am/a/path) | ||
| SEPT_VAR separate_arguments(SEPT_VAR;NATIVE_COMMAND;-sep -args -please) | ||
| SITE_VAR site_name(SITE_VAR) | ||
| STRING_APPEND_VAR string(APPEND;STRING_APPEND_VAR;APPENDME) | ||
| STRING_ASCII_VAR string(ASCII;10;20;30;STRING_ASCII_VAR) | ||
| STRING_COMPARE_VAR string(COMPARE;EQUAL;ABC;123;STRING_COMPARE_VAR) | ||
| STRING_CONCAT_VAR string(CONCAT;STRING_CONCAT_VAR;abc;123) | ||
| STRING_C_VAR string(MAKE_C_IDENTIFIER;0x100;STRING_C_VAR) | ||
| STRING_FIND_VAR string(FIND;FINDME;ME;STRING_FIND_VAR) | ||
| STRING_HASH_VAR string(SHA512;STRING_HASH_VAR;12345) | ||
| STRING_HEX_VAR string(HEX;1020;STRING_HEX_VAR) | ||
| STRING_PREPEND_VAR string(PREPEND;STRING_PREPEND_VAR;PREPENDME) | ||
| STRING_RANDOM_VAR string(RANDOM;STRING_RANDOM_VAR) | ||
| STRING_REG_MATCH_VAR string(REGEX;MATCH;TEST;STRING_REG_MATCH_VAR;TEST123) | ||
| STRING_REG_REPLACE_VAR string(REGEX;REPLACE;TEST;;STRING_REG_REPLACE_VAR;TEST123) | ||
| STRING_REPEAT_VAR string(REPEAT;REPEAT;2;STRING_REPEAT_VAR) | ||
| STRING_REPLACE_VAR string(REPLACE;ME;;STRING_REPLACE_VAR;ALLABOUTMEME) | ||
| STRING_SUB_VAR string(SUBSTRING;ABCDEF;0;3;STRING_SUB_VAR) | ||
| STRING_TIME_VAR string(TIMESTAMP;STRING_TIME_VAR) | ||
| STRING_UUID_VAR string(UUID;STRING_UUID_VAR;NAMESPACE;6ba7b810-9dad-11d1-80b4-00c04fd430c8;NAME;test;TYPE;SHA1) | ||
| VCPKG_CRT_LINKAGE set(VCPKG_CRT_LINKAGE;dynamic) | ||
| VCPKG_LIBRARY_LINKAGE set(VCPKG_LIBRARY_LINKAGE;static) | ||
| VCPKG_TARGET_ARCHITECTURE set(VCPKG_TARGET_ARCHITECTURE;x64) |
17 changes: 17 additions & 0 deletions
17
azure-pipelines/e2e_ports/triplet-abi/vcpkg-test-triplet-abi/portfile.cmake
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| set(VCPKG_POLICY_EMPTY_PACKAGE enabled) | ||
|
|
||
| file(STRINGS "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}.vcpkg_abi_info.txt" actual_abi_lines) | ||
| file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/expected-abi.txt" expected_abi_lines) | ||
| file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/unexpected-abi.txt" unexpected_abi_lines) | ||
|
|
||
| foreach(expected_line IN LISTS expected_abi_lines) | ||
| if(NOT "${expected_line}" IN_LIST actual_abi_lines) | ||
| message(FATAL_ERROR "Expected ABI: '${expected_line}' \n not within actual ABI: '${actual_abi_lines}'") | ||
| endif() | ||
| endforeach() | ||
|
|
||
| foreach(unexpected_abi_line IN LISTS unexpected_abi_lines) | ||
| if("${unexpected_abi_line}" IN_LIST actual_abi_lines) | ||
| message(FATAL_ERROR "Unexpected ABI: '${expected_line}' \n found within actual ABI: '${actual_abi_lines}'") | ||
| endif() | ||
| endforeach() |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e_ports/triplet-abi/vcpkg-test-triplet-abi/unexpected-abi.txt
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| NOT_IN_ABI_UNSET set(NOT_IN_ABI_UNSET;test) | ||
| NOT_IN_ABI_UNSET unset(NOT_IN_ABI_UNSET) | ||
| NOT_IN_ABI_UNSET_2 unset(NOT_IN_ABI_UNSET_2) | ||
| NOT_IN_ABI set(NOT_IN_ABI;TEST) | ||
| NOT IN ABI COMMENT |
5 changes: 5 additions & 0 deletions
5
azure-pipelines/e2e_ports/triplet-abi/vcpkg-test-triplet-abi/vcpkg.json
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "vcpkg-test-triplet-abi", | ||
| "version": "0", | ||
| "description": "A port that inspects the abi" | ||
| } | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| set(VCPKG_TARGET_ARCHITECTURE x64) # | ||
| set(VCPKG_CRT_LINKAGE dynamic) # | ||
| set(VCPKG_LIBRARY_LINKAGE static) # | ||
| if(0) | ||
| set(VCPKG_CMAKE_SYSTEM_NAME Windows) # NOT IN ABI COMMENT | ||
| elseif(DARWIN) | ||
|
Neumann-A marked this conversation as resolved.
Outdated
|
||
| set(VCPKG_CMAKE_SYSTEM_NAME Darwin) | ||
| elseif(UNIX) | ||
| set(VCPKG_CMAKE_SYSTEM_NAME Linux) | ||
| endif() | ||
| set(NOT_IN_ABI_UNSET "test") | ||
| unset(NOT_IN_ABI_UNSET) | ||
| unset(NOT_IN_ABI_UNSET_2) | ||
| unset(ENV{NOTPATH}) # | ||
| option(OPT_VAR "TEXT" OFF) # | ||
| separate_arguments(SEPT_VAR NATIVE_COMMAND "-sep -args -please") # | ||
| site_name(SITE_VAR) # | ||
| get_directory_property(GET_VAR VARIABLES) # | ||
| find_program(FIND_VAR NAMES gcc) # | ||
| cmake_path(SET PATH_VAR "i/am/a/path") # | ||
| cmake_path(GET PATH_VAR ROOT_NAME PATH_ROOT_VAR) # | ||
| cmake_path(HASH PATH_VAR PATH_HASH_VAR) # | ||
| cmake_path(NATIVE_PATH PATH_VAR PATH_NATIVE_VAR) # | ||
| cmake_path(IS_RELATIVE PATH_VAR PATH_IS_VAR) # | ||
| cmake_path(HAS_EXTENSION PATH_VAR PATH_HAS_VAR) # | ||
| cmake_path(CONVERT "$ENV{PATH}" TO_CMAKE_PATH_LIST PATH_CONVERT_VAR) # | ||
| cmake_path(NORMAL_PATH PATH_VAR OUTPUT_VARIABLE PATH_NORMAL_VAR) # | ||
| cmake_path(REMOVE_FILENAME PATH_VAR OUTPUT_VARIABLE PATH_REMOVE_VAR) # | ||
| execute_process(COMMAND echo "Hello" OUTPUT_VARIABLE EXE_OUT_VAR RESULT_VARIABLE EXE_RES_VAR ERROR_VARIABLE EXE_ERR_VAR) ### | ||
| file(READ "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_READ_VAR) # | ||
| file(STRINGS "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_STRINGS_VAR)# | ||
| file(SHA512 "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_HASH_VAR) # | ||
| file(TIMESTAMP "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_TIMESTAMP_VAR)# | ||
| file(SIZE "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_SIZE_VAR)# | ||
| file(REAL_PATH "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_REAL_VAR)# | ||
| file(TO_CMAKE_PATH "${CMAKE_CURRENT_LIST_DIR}/file-to-read" FILE_CMAKE_VAR)# | ||
| file(GLOB FILE_GLOB_VAR "*") # | ||
| file(RELATIVE_PATH FILE_REL_VAR "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/file-to-read" ) # | ||
| list(APPEND LIST_VAR2 "e1" "e2" "e3")# | ||
| list(APPEND LIST_VAR "e1" "e2" "e3") | ||
| list(POP_BACK LIST_VAR LIST_OUT_VAR) # | ||
| math(EXPR MATH_VAR "1 + 1") # | ||
| string(FIND "FINDME" "ME" STRING_FIND_VAR) # | ||
| string(REPLACE "ME" "" STRING_REPLACE_VAR "ALLABOUTMEME") # | ||
| string(REPEAT "REPEAT" "2" STRING_REPEAT_VAR) # | ||
| string(APPEND STRING_APPEND_VAR "APPENDME") # | ||
| string(PREPEND STRING_PREPEND_VAR "PREPENDME") # | ||
| string(TIMESTAMP STRING_TIME_VAR) # | ||
| string(UUID STRING_UUID_VAR NAMESPACE "6ba7b810-9dad-11d1-80b4-00c04fd430c8" NAME "test" TYPE SHA1) # | ||
| string(CONCAT STRING_CONCAT_VAR "abc" "123") # | ||
| string(SHA512 STRING_HASH_VAR "12345") # | ||
| string(JSON JSON_VAR ERROR_VARIABLE JSON_ERR_VAR GET "{\"test\": true}" "test") ## | ||
| string(REGEX REPLACE "TEST" "" STRING_REG_REPLACE_VAR "TEST123") # | ||
| string(REGEX MATCH "TEST" STRING_REG_MATCH_VAR "TEST123") # | ||
| string(SUBSTRING "ABCDEF" 0 3 STRING_SUB_VAR) # | ||
| string(ASCII 10 20 30 STRING_ASCII_VAR) # | ||
| string(HEX "1020" STRING_HEX_VAR) # | ||
| string(MAKE_C_IDENTIFIER "0x100" STRING_C_VAR) # | ||
| string(RANDOM STRING_RANDOM_VAR) # | ||
| string(COMPARE "EQUAL" "ABC" "123" STRING_COMPARE_VAR) # | ||
| # Not in ABI | ||
| if(0) | ||
| set(NOT_IN_ABI "TEST") | ||
| endif() | ||
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| . $PSScriptRoot/../end-to-end-tests-prelude.ps1 | ||
| Run-Vcpkg "--overlay-triplets=$PSScriptRoot/../e2e_ports/triplet-abi" "--overlay-ports=$PSScriptRoot/../e2e_ports/triplet-abi" install vcpkg-test-triplet-abi --triplet x64-abi | ||
| Throw-IfFailed |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.