Merge changes from topic "clang_supported"
* changes: Prepare for clang+mingw windows builds Fix / suppress warnings for clang+mingw
This commit is contained in:
commit
30f514cc51
|
@ -667,7 +667,7 @@ endif
|
||||||
|
|
||||||
|
|
||||||
ifdef j_or_n
|
ifdef j_or_n
|
||||||
$(j_or_n) $(h_or_t) $(j_or_n)-$(h_or_t) : $(my_checked_module)
|
$(j_or_n) $(h_or_t) $(j_or_n)-$(h_or_hc_or_t) : $(my_checked_module)
|
||||||
ifneq (,$(filter $(my_module_tags),tests))
|
ifneq (,$(filter $(my_module_tags),tests))
|
||||||
$(j_or_n)-$(h_or_t)-tests $(j_or_n)-tests $(h_or_t)-tests : $(my_checked_module)
|
$(j_or_n)-$(h_or_t)-tests $(j_or_n)-tests $(h_or_t)-tests : $(my_checked_module)
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -387,9 +387,9 @@ endif
|
||||||
# clang is enabled by default for host builds
|
# clang is enabled by default for host builds
|
||||||
# enable it unless we've specifically disabled clang above
|
# enable it unless we've specifically disabled clang above
|
||||||
ifdef LOCAL_IS_HOST_MODULE
|
ifdef LOCAL_IS_HOST_MODULE
|
||||||
ifeq ($($(my_prefix)OS),windows)
|
ifneq ($($(my_prefix)CLANG_SUPPORTED),true)
|
||||||
ifeq ($(my_clang),true)
|
ifeq ($(my_clang),true)
|
||||||
$(error $(LOCAL_MODULE_MAKEFILE): $(LOCAL_MODULE): Clang is not yet supported for windows binaries)
|
$(call pretty-error,Clang is not yet supported for $($(my_prefix)OS) binaries)
|
||||||
endif
|
endif
|
||||||
my_clang := false
|
my_clang := false
|
||||||
else
|
else
|
||||||
|
|
|
@ -10,6 +10,7 @@ cc_library_host_static {
|
||||||
name: "libhost",
|
name: "libhost",
|
||||||
target: {
|
target: {
|
||||||
windows: {
|
windows: {
|
||||||
|
cflags: ["-Wno-unused-parameter"],
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -352,7 +352,12 @@ static int copyRegular(const char* src, const char* dst, const struct stat* pSrc
|
||||||
* need to trash it so we can create one.
|
* need to trash it so we can create one.
|
||||||
*/
|
*/
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
extern int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int options) __attribute__((error("no symlinks on Windows")));
|
extern int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int options)
|
||||||
|
#ifdef __clang__
|
||||||
|
__attribute__((unavailable("no symlinks on Windows")));
|
||||||
|
#else
|
||||||
|
__attribute__((error("no symlinks on Windows")));
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
static int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int options)
|
static int copySymlink(const char* src, const char* dst, const struct stat* pSrcStat, unsigned int options)
|
||||||
{
|
{
|
||||||
|
@ -574,8 +579,10 @@ static int copyFileRecursive(const char* src, const char* dst, bool isCmdLine, u
|
||||||
} else {
|
} else {
|
||||||
retVal = copyDirectory(src, dst, &srcStat, options);
|
retVal = copyDirectory(src, dst, &srcStat, options);
|
||||||
}
|
}
|
||||||
|
#if !defined(_WIN32)
|
||||||
} else if (S_ISLNK(srcStat.st_mode)) {
|
} else if (S_ISLNK(srcStat.st_mode)) {
|
||||||
retVal = copySymlink(src, dst, &srcStat, options);
|
retVal = copySymlink(src, dst, &srcStat, options);
|
||||||
|
#endif
|
||||||
} else if (S_ISREG(srcStat.st_mode)) {
|
} else if (S_ISREG(srcStat.st_mode)) {
|
||||||
retVal = copyRegular(src, dst, &srcStat, options);
|
retVal = copyRegular(src, dst, &srcStat, options);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue