-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[tensorflow-cc/tensorflow-common] Add uwp port #14394
Closed
Closed
Changes from all commits
Commits
Show all changes
206 commits
Select commit
Hold shift + click to select a range
0ab169d
fix build issues occurring from default bazel config being used becau…
543e19d
[tensorflow-cc] Update CONTROL and ci.baseline.txt
LilyWangL 820c455
fix also applies to windows static build
9643548
fix debug and static builds as well as library naming for non-linux
4860a01
upgrade tensorflow from v1.14 to v2.3
dd6d89f
fix execute process macro
0d611be
extend overriden execute_process to more than one COMMAND as there ac…
d3121ce
Merge pull request #1 from microsoft/master
jgehw ee969d7
merge branch 'fix-execute-process-macro2' into 'fix-static-builds-and…
ad5ca5f
added another patch required for tensorflow v2.3, fixed path and work…
c743e49
Revert "incorporate changes from microsoft:master"
jgehw 2571bd1
Merge pull request #2 from jgehw/revert-1-master
jgehw 98ecc0c
Revert "Revert "incorporate changes from microsoft:master""
jgehw ab8fdf7
Merge branch 'master' of https://github.com/microsoft/vcpkg
36143ac
Merge branch 'master' of https://github.com/microsoft/vcpkg
ea07bb9
final fixes for static build + improving out messages
a12d22f
enabling linux and osx in CI to see if it works now
6c34a08
Merge branch 'master' into fix-static-builds-and-more
jgehw 6e31cd6
simplified code, fixed version numbers, fixed generated include cmake…
afc7f1e
fix failing postbuild check on handcrafted empty dummy library by spr…
898bbbe
remove dead code commit by mistake again
2ca1f94
Merge branch 'fix-static-builds-and-more' of https://github.com/jgehw…
1866a82
Merge branch 'master' of https://github.com/microsoft/vcpkg
350b151
improvements from code review
630e890
cleaner fix for debug code
2c66c4b
find pip3 in PATH (PYTHON3_DIR apparently not valid for pip3)
40954e4
fix error in python helper script
9451d33
Merge branch 'master' of https://github.com/microsoft/vcpkg
d198bf1
fix wrong libname in postbuild script
f6acaeb
fix python detection + switch to python on msys2 (instead of embedded…
efd0c93
fix order of arguments
jgehw 5c1f7ae
fix command (it may contain spaces such as C:\Program Files\...)
jgehw 3b95e18
revert last commit (root cause for CI failures is something different…
jgehw bfffec6
fix regex comparision
jgehw c9d08e9
fix linebreaks in generated file
jgehw 2de4912
merge branch 'fix-execute-process-macro2' into 'fix-static-builds-and…
jgehw cdfdc65
fix CRT linkage
jgehw c8c12b8
refactor implemenation to avoid as much code duplication as possible …
jgehw 71cf605
Merge branch 'master' into fix-static-builds-and-more
jgehw 9f67738
Merge branch 'fix-static-builds-and-more' of https://github.com/jgehw…
jgehw 5d09b86
fix version numbers in helper scripts
jgehw 6cb4e5b
enable work-around for Windows until bazel fix is available
jgehw 5376c01
install missing python3-pip on linux
jgehw 692c742
fix linux build by patching
jgehw fbbde32
Merge branch 'master' of https://github.com/microsoft/vcpkg
jgehw 37c3528
merge branch 'master' into 'fix-static-builds-and-more'
jgehw 1246969
apply timeout feature now available via merged master branch
jgehw c918214
correct linux build patch
jgehw e78a3df
improve debug build patches
jgehw 9103128
improve linux patch
jgehw fc4404a
temporarily add debug to inspect what's going on on macOS CI
jgehw cc3823d
Merge branch 'master' of https://github.com/microsoft/vcpkg
jgehw 74cc334
remove temporary debug code and fix static linking scripts for linux …
jgehw ee1082f
fix regex escaping
jgehw 381066a
fix ambiguous match while grepping for the framework link command
jgehw 006a21a
extend fix of ambiguous match while grepping for the framework link c…
jgehw f7ee6c6
Merge branch 'master' of https://github.com/microsoft/vcpkg
jgehw b667b99
Merge branch 'master' into fix-static-builds-and-more
jgehw 37f79c6
Merge branch 'master' of https://github.com/microsoft/vcpkg
jgehw d77a47c
fix what merge of master broke
jgehw 74c4fc8
Merge branch 'master' into fix-static-builds-and-more
jgehw f81922c
fix more what got broken by merging master
jgehw f0d1c89
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw 3d8e2f2
remove "unofficial" from filename
jgehw 2051e9e
added switch do distinct classic and manifest mode when generating co…
jgehw 1241b67
create symlinks for libraries without version number
jgehw 1da9b92
fix linux postbuild script
jgehw 3df3b9b
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw 900512c
Merge branch 'master' into fix-static-builds-and-more
jgehw fb609b5
temporarily disable code making problems
jgehw ec68741
add note for linking on Linux and macOS
jgehw 84af4a0
forget to add README file in previous commit
jgehw 7f599a2
add file forgotton in macro fixing patch
jgehw 067323c
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw b8e9523
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw bcda036
Merge branch 'master' into fix-static-builds-and-more
jgehw e4f15a8
fix python library path
jgehw da3cb5a
fix macOS static link command
jgehw 7273f86
update linkage instructions in README
jgehw fdc5cf6
Update ports/tensorflow-cc/CONTROL
JackBoosY 05be090
Update ports/tensorflow-cc/portfile.cmake
JackBoosY faf3447
Update scripts/ci.baseline.txt
JackBoosY 3787012
use vcpkg_execute_required_process
jgehw 0877229
pass C_FLAGS and CXX_FLAGS to bazel
jgehw eaf1d7c
fix INTERFACE_INCLUDE_DIRECTORIES
jgehw 0a986ac
fix optional c/cxx arguments
jgehw bb63d8c
also add linker opts
jgehw 79076a2
Merge branch 'pass-cflags-to-bazel' into fix-static-builds-and-more
jgehw ca81fb9
update README
jgehw 8e16503
merge static libs into one
8677bdb
update README
39312c7
Merge branch 'master' of https://github.com/microsoft/vcpkg
79a26c8
Merge branch 'master' into fix-static-builds-and-more
6384898
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw 533895b
Merge branch 'master' into fix-static-builds-and-more
jgehw d3e3c2a
Merge branch 'master' of https://github.com/microsoft/vcpkg
2ad839b
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw f4e64da
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw 180925f
quote python path (it might contain spaces that don't get escaped ins…
jgehw 4584d3a
fix python path also for static build
jgehw 49f6f38
add arm(64) as currently unsupported arch
jgehw a174637
bazel 3.7 is available -> remove workaround
jgehw 292013f
update README, remove necessary c-ares from deps
jgehw f8e004c
update msys package
a259f33
Merge branch 'fix-static-builds-and-more' of https://github.com/jgehw…
0ab5c4e
add uwp specific options, and minor general improvements
920af34
fix string replace
6594588
fix control file and windows path separator
0a22920
revert backslashes-fix -- the root cause was missing .exe extension
4ef9252
upgrade to tf 2.3.1
41e2f80
fix hard-coded version
7fa2689
Merge branch 'master' into fix-static-builds-and-more
jgehw fe1d24c
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw ff1d1c9
Merge branch 'master' into fix-static-builds-and-more
jgehw f064862
remove uwp work-in-progress code so that PR can be merged
jgehw a68ae07
add [tensorflow] C API port
jgehw b3a6018
missing in previous commit
jgehw e2b95d1
fix include file
jgehw 83149c4
remove unnecessary suffix
jgehw 4840250
update README and print out usage info in portfile
jgehw 24831cc
Merge branch 'fix-static-builds-and-more' into add-tensorflow-c
jgehw b2b19a6
add UWP patches
jgehw 0f052b2
fix uwp patch file
jgehw 3141fb9
fix patch again
jgehw 756dca2
fix patch again
jgehw a8e88d7
fix patch again
jgehw 2f73611
move options from command line to .bazelrc
jgehw 73bf321
fix include paths
jgehw 0bb4819
work around bazel restriction "The include path 'D:/buildtrees/tensor…
jgehw 9f5ef93
go for a completely different approach: force-include uwppatch.h
jgehw 5a05ca7
fix include path again
jgehw 58ae817
choose different include location, which is available in bazel build …
jgehw 9ad7b7d
fix compile errors
jgehw 5c7817b
update header (getenv redefinition)
jgehw 1be36c5
next try to get patched headers to work
jgehw b21b6fe
another try to fix include paths
jgehw 9a5af3d
update patched header, bazel has its own naming for target triplet
jgehw c067c87
yet another try to fix patched include path
jgehw d129bd2
next try to fix includes: patch bazel deps where required
jgehw cfbdc9c
fix patch
jgehw 3898892
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw 06f7a9c
Merge branch 'master' into add-tensorflow-c
jgehw e1c55ed
Update ports/tensorflow-cc/CONTROL
jgehw 51cae0d
Update ports/tensorflow/portfile.cmake
jgehw 52a905d
follow-up to code review
jgehw 5e5c7ab
extend patch (further build deps)
jgehw d954930
fix suffix parameter
jgehw 12a96ce
add more build deps
jgehw f3351f5
fix quoting
jgehw 77559a6
Merge branch 'master' of https://github.com/microsoft/vcpkg into master
jgehw 26cbca8
Merge branch 'master' into add-tensorflow-c
jgehw 43039bc
extend linux patch
jgehw 3e7d9b4
fix patch
jgehw bb66874
extend patch again
jgehw a1babea
yet another deps fix
jgehw d005d4d
another try to fix quoting of possibly empty string parameter
jgehw b28359c
add another deps patch
jgehw 758a78f
extend patch again
jgehw 6374836
different approach to fix empty string arguments
jgehw 65c3073
Merge branch 'add-tensorflow-c' into add-tf-uwp
jgehw cf093d1
fix portfiles, add more bazel deps
jgehw e45fdcf
update list of headers for tensorflow 2.3.1 (was still 2.3.0)
jgehw 45912df
update list of headers for v2.3.1
jgehw f9f8572
extend bazel deps path again
jgehw 3b3ef9f
Update ports/tensorflow/CONTROL
jgehw ea05d03
fix bazel deps, bump port version
jgehw 1665fd2
add more bazel deps
jgehw bb1a320
move common stuff into tensorflow-common as discussed in review
jgehw e0e437d
go for a different approach (patch bazel toolchain) as adding bazel d…
jgehw d468baf
Apply suggestions from code review
jgehw 493fdb6
yet again a completely different approach to fix the include path
jgehw 15ab0e7
fix path
jgehw 4894eb2
fix path again
jgehw dd82b43
Merge branch 'add-tensorflow-c' into add-tf-uwp
jgehw d763508
merge changes from C port
jgehw bd71978
fix cmake variable replacement (apparently @ cannot be escaped...)
jgehw 9e64aef
Merge branch 'master' into add-tf-uwp
jgehw c5a4d61
try again without escaping
jgehw d5014be
use absolute path
jgehw e9e8031
fix escaping
jgehw 7a11dda
calculate absolute path
jgehw 6a40066
fix replacement in configure_file
jgehw 4e1c29c
handle directory exists error
jgehw d17b840
convert cygpath to windows path
jgehw a1b86df
overcome backslash / escaping issues
jgehw 7bfae95
Merge branch 'master' of https://github.com/microsoft/vcpkg
jgehw 6384419
try include with build-root-relative path
jgehw fc75c56
apply work-around until proper solution is available
jgehw 3c9d47e
Merge branch 'master' of https://github.com/microsoft/vcpkg
jgehw 57c8d3c
Merge branch 'master' into add-tf-uwp
jgehw f0804f1
merge master
jgehw b69ba43
resolved conflicts
jgehw 15dda4d
Revert "merge master"
jgehw 89a2e45
add uwp files to copy list
jgehw 874c4b6
update uwppatch.h
jgehw 79b3d50
fix typo
jgehw 77b4118
patch the patch for UWP case
jgehw d513eb0
fix patch (missing spaces)
jgehw 653a3bb
fix build error in AWS SDK prerequisit
jgehw c45bb8a
fix more compilation errors
jgehw 9d14d06
replace previous patch with more targeted patch
jgehw f4192a8
add escaped quotes around Windows path with spaces
jgehw 9ce008f
cleanup
jgehw 52e0d0d
merge patch (there can only be one patch file per external)
jgehw 0a91d3d
add messages to user
jgehw 921c8ca
update versions files
jgehw 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 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 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 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,137 @@ | ||
diff --git a/.bazelrc b/.bazelrc | ||
--- a/.bazelrc | ||
+++ b/.bazelrc | ||
@@ -318,7 +318,9 @@ | ||
build:windows --verbose_failures | ||
|
||
# On windows, we never cross compile | ||
-build:windows --distinct_host_configuration=false | ||
+build:windows --distinct_host_configuration=true | ||
+build:windows --host_copt=-UWINAPI_FAMILY | ||
+build:windows --host_linkopt=/APPCONTAINER:NO | ||
|
||
# Suppress all warning messages. | ||
build:short_logs --output_filter=DONT_MATCH_ANYTHING | ||
|
||
|
||
diff --git a/third_party/curl.BUILD b/third_party/curl.BUILD | ||
--- a/third_party/curl.BUILD | ||
+++ b/third_party/curl.BUILD | ||
@@ -472,9 +472,7 @@ | ||
"# define CURL_DISABLE_TELNET 1", | ||
"# define CURL_DISABLE_TFTP 1", | ||
"# define CURL_PULL_WS2TCPIP_H 1", | ||
- "# define USE_WINDOWS_SSPI 1", | ||
"# define USE_WIN32_IDN 1", | ||
- "# define USE_SCHANNEL 1", | ||
"# define WANT_IDN_PROTOTYPES 1", | ||
"#elif defined(__APPLE__)", | ||
"# define HAVE_FSETXATTR_6 1", | ||
|
||
|
||
diff --git a/third_party/sqlite.BUILD b/third_party/sqlite.BUILD | ||
--- a/third_party/sqlite.BUILD | ||
+++ b/third_party/sqlite.BUILD | ||
@@ -13,6 +13,7 @@ | ||
] + select({ | ||
"@org_tensorflow//tensorflow:windows": [ | ||
"-DSQLITE_MAX_TRIGGER_DEPTH=100", | ||
+ "-DSQLITE_OS_WINRT=1", | ||
], | ||
"@org_tensorflow//tensorflow:macos": [ | ||
"-Os", | ||
|
||
|
||
diff --git a/third_party/aws/workspace.bzl b/third_party/aws/workspace.bzl | ||
--- a/third_party/aws/workspace.bzl | ||
+++ b/third_party/aws/workspace.bzl | ||
@@ -15,6 +15,7 @@ | ||
sha256 = "758174f9788fed6cc1e266bcecb20bf738bd5ef1c3d646131c9ed15c2d6c5720", | ||
strip_prefix = "aws-sdk-cpp-1.7.336", | ||
build_file = "//third_party/aws:BUILD.bazel", | ||
+ patch_file = "//third_party/aws:FileSystem.patch", | ||
) | ||
|
||
third_party_http_archive( | ||
|
||
|
||
diff --git a/third_party/aws/FileSystem.patch b/third_party/aws/FileSystem.patch | ||
new file mode 100644 | ||
--- /dev/null | ||
+++ b/third_party/aws/FileSystem.patch | ||
@@ -0,0 +1,10 @@ | ||
+diff --git a/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp b/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp | ||
+--- a/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp | ||
++++ b/aws-cpp-sdk-core/source/platform/windows/FileSystem.cpp | ||
+@@ -20,6 +20,7 @@ | ||
+ #include <cassert> | ||
+ #include <iostream> | ||
+ #include <Userenv.h> | ||
++#include <Windows.h> | ||
+ | ||
+ #pragma warning( disable : 4996) | ||
+ | ||
|
||
|
||
diff --git a/third_party/icu/BUILD.bazel b/third_party/icu/BUILD.bazel | ||
--- a/third_party/icu/BUILD.bazel | ||
+++ b/third_party/icu/BUILD.bazel | ||
@@ -45,6 +45,7 @@ | ||
copts = [ | ||
"-DU_COMMON_IMPLEMENTATION", | ||
"-DU_HAVE_STD_ATOMICS", # TODO(gunan): Remove when TF is on ICU 64+. | ||
+ "-DU_PLATFORM_HAS_WINUWP_API=1", | ||
] + select({ | ||
":android": [ | ||
"-fdata-sections", | ||
|
||
|
||
diff --git a/third_party/icu/udata.patch b/third_party/icu/udata.patch | ||
--- a/third_party/icu/udata.patch | ||
+++ b/third_party/icu/udata.patch | ||
@@ -44,16 +44,32 @@ | ||
|
||
/*----------------------------------------------------------------------* | ||
* * | ||
-@@ -710,10 +708,11 @@ | ||
- if (uprv_getICUData_collation) { | ||
- setCommonICUDataPointer(uprv_getICUData_collation(), FALSE, pErrorCode); | ||
- } | ||
-+ */ | ||
- if (uprv_getICUData_conversion) { | ||
- setCommonICUDataPointer(uprv_getICUData_conversion(), FALSE, pErrorCode); | ||
- } | ||
-- */ | ||
-+ | ||
- #if U_PLATFORM_HAS_WINUWP_API == 0 // Windows UWP Platform does not support dll icu data at this time | ||
- setCommonICUDataPointer(&U_ICUDATA_ENTRY_POINT, FALSE, pErrorCode); | ||
- { | ||
+--- a/icu4c/source/common/ucnvisci.cpp | ||
+--- b/icu4c/source/common/ucnvisci.cpp | ||
+@@ -1230,7 +1230,7 @@ | ||
+ *err =U_ILLEGAL_CHAR_FOUND; | ||
+ /* reset */ | ||
+ *contextCharToUnicode=NO_CHAR_MARKER; | ||
+- goto CALLBACK; | ||
++ goto CALLBACK_LABEL; | ||
+ } | ||
+ } | ||
+ | ||
+@@ -1269,7 +1269,7 @@ | ||
+ *contextCharToUnicode= NO_CHAR_MARKER; | ||
+ *err = U_ILLEGAL_CHAR_FOUND; | ||
+ } | ||
+- goto CALLBACK; | ||
++ goto CALLBACK_LABEL; | ||
+ } else if (*contextCharToUnicode==ISCII_INV) { | ||
+ if (sourceChar==ISCII_HALANT) { | ||
+ targetUniChar = 0x0020; /* replace with space accoding to Indic FAQ */ | ||
+@@ -1483,7 +1483,7 @@ | ||
+ * so assign codes to reason and err | ||
+ */ | ||
+ *err = U_INVALID_CHAR_FOUND; | ||
+-CALLBACK: | ||
++CALLBACK_LABEL: | ||
+ args->converter->toUBytes[0] = (uint8_t) sourceChar; | ||
+ args->converter->toULength = 1; | ||
+ break; |
This file contains 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 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 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,24 @@ | ||
genrule( | ||
name = "patch_include_dirs", | ||
cmd = """ | ||
dest_path=`dirname "$@AT_CHAR_FOR_CONFIGURE_FILE@"` | ||
# calc absolute path | ||
if [ "$${dest_path:0:1}" != "/" ] ; then | ||
current_dir=`pwd` | ||
dest_path="$${current_dir}/$${dest_path}" | ||
fi | ||
mkdir -p "$${dest_path}" | ||
cp '@CMAKE_CURRENT_LIST_DIR@/uwppatch.h' "$${dest_path}" | ||
windows_path=`cygpath -w "$${dest_path}"` | ||
# use forward slashes | ||
windows_path=`echo $${windows_path} | sed -e s'|\\\\\\\\\\\\\\\\|/|'g` | ||
echo \\\"$${windows_path}/\\\", >> $(location @AT_CHAR_FOR_CONFIGURE_FILE@local_config_cc//:builtin_include_directory_paths_msvc) | ||
""", | ||
srcs = [ | ||
"@AT_CHAR_FOR_CONFIGURE_FILE@local_config_cc//:toolchain", | ||
"@AT_CHAR_FOR_CONFIGURE_FILE@local_config_cc//:builtin_include_directory_paths_msvc", | ||
], | ||
outs = [ | ||
"patched_includes/uwppatch.h" | ||
], | ||
) |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unfortunately against vcpkg policy and cannot be merged as-is due to modifying global system state.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I understand. So, as all other approaches I tried didn't work in the end, we need to wait until someone else has a solution or somebody answers the according question I posted for this: https://stackoverflow.com/questions/65184913/how-do-i-add-an-additional-system-include-directory-using-bazel