diff --git a/clang/unittests/libclang/TestUtils.h b/clang/unittests/libclang/TestUtils.h --- a/clang/unittests/libclang/TestUtils.h +++ b/clang/unittests/libclang/TestUtils.h @@ -71,7 +71,7 @@ UnsavedFiles.push_back({ it.first->first->c_str(), // filename it.first->second->c_str(), // contents - it.first->second->size() // length + static_cast(it.first->second->size()) // length }); } template @@ -91,4 +91,4 @@ } }; -#endif // LLVM_CLANG_TEST_TESTUTILS_H \ No newline at end of file +#endif // LLVM_CLANG_TEST_TESTUTILS_H diff --git a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/clang/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/clang/BUILD.bazel @@ -1332,6 +1332,10 @@ "//llvm:Target", "//llvm:config", ], + linkopts = select({ + "@bazel_tools//src/conditions:windows": ["/DEFAULTLIB:version.lib"], + "//conditions:default": [], + }), ) gentbl( @@ -1796,9 +1800,10 @@ "tools/c-index-test/c-index-test.c", "tools/c-index-test/core_main.cpp", ], - copts = [ - "-Wno-uninitialized", - ], + copts = select({ + "@bazel_tools//src/conditions:windows": [], + "//conditions:default": ["-Wno-uninitialized"], + }), stamp = 0, deps = [ ":ast", diff --git a/utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h b/utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h --- a/utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h +++ b/utils/bazel/llvm-project-overlay/clang/include/clang/Config/config.h @@ -75,7 +75,7 @@ /* #undef CLANG_HAVE_LIBXML */ /* Define if we have sys/resource.h (rlimits) */ -#define CLANG_HAVE_RLIMITS 1 +/* #undef CLANG_HAVE_RLIMITS */ /* The LLVM product name and version */ #define BACKEND_PACKAGE_STRING "LLVM 12.0.0git" diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -3096,7 +3096,9 @@ name = "llvm-mca", srcs = glob([ "tools/llvm-mca/*.cpp", + "tools/llvm-mca/*.h", "tools/llvm-mca/Views/*.cpp", + "tools/llvm-mca/Views/*.h", ]), copts = llvm_copts, stamp = 0, diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl --- a/utils/bazel/llvm-project-overlay/llvm/config.bzl +++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl @@ -27,6 +27,10 @@ "LLVM_ENABLE_THREADS=1", "HAVE_SYSEXITS_H=1", "HAVE_UNISTD_H=1", + "HAVE_PTHREAD_H=1", + "HAVE_SYS_RESOURCE_H=1", + "CLANG_HAVE_RLIMITS=1", + "HAVE_SETENV=1", "HAVE_STRERROR_R=1", "HAVE_LIBPTHREAD=1", "HAVE_PTHREAD_GETNAME_NP=1", @@ -56,8 +60,9 @@ win32_defines = [ # MSVC specific - "stricmp=_stricmp", - "strdup=_strdup", + #"stricmp=_stricmp", + #"strdup=_strdup", + "CINDEX_NO_EXPORTS", # LLVM features r'LTDL_SHLIB_EXT=\".dll\"', diff --git a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h --- a/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h +++ b/utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h @@ -174,7 +174,7 @@ #define HAVE_PTHREAD_GETSPECIFIC 1 /* Define to 1 if you have the header file. */ -#define HAVE_PTHREAD_H 1 +/* HAVE_PTHREAD_H defined in Bazel */ /* Have pthread_mutex_lock */ #define HAVE_PTHREAD_MUTEX_LOCK 1 @@ -186,7 +186,7 @@ /* HAVE_SBRK defined in Bazel */ /* Define to 1 if you have the `setenv' function. */ -#define HAVE_SETENV 1 +/* HAVE_SETENV defined in Bazel */ /* Define to 1 if you have the `setrlimit' function. */ #define HAVE_SETRLIMIT 1 @@ -216,7 +216,7 @@ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ -#define HAVE_SYS_RESOURCE_H 1 +/* HAVE_SYS_RESOURCE_H defined in Bazel */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1