Imported Upstream version 5.18.0.234

Former-commit-id: 8071ec1a8c5eaa9be24b41745add19297608001f
This commit is contained in:
Xamarin Public Jenkins (auto-signing) 2019-01-08 08:22:36 +00:00
parent f32dbaf0b2
commit 212f6bafcb
28494 changed files with 359 additions and 3867025 deletions

View File

@ -201,6 +201,9 @@
*/
#undef HAVE_ANDROID_LEGACY_SIGNAL_INLINES_H
/* Define to 1 if you have the <android/ndk-version.h> header file. */
#undef HAVE_ANDROID_NDK_VERSION_H
/* Define to 1 if you have the <android/versioning.h> header file. */
#undef HAVE_ANDROID_VERSIONING_H

View File

@ -1 +1 @@
ec4573a886d6efd9e2214b4dd0417f3244b35889
ae98551b1db35055297baac5f507513e249171ed

View File

@ -1 +1 @@
fe41ec21f58c4a07e394fbfd0cba222410f7a56a
dc37e92b4d1cf4287140b253da667bc8e075bbe5

View File

@ -213,7 +213,11 @@ class GtkPackage (GitHubPackage):
#'patches/gtk/gtk-fix-find_nsview_at_pos-recursive.patch',
# https://devdiv.visualstudio.com/DevDiv/_workitems/edit/569768
'patches/gtk/gtk-imquartz-commit-on-focus-out.patch'
'patches/gtk/gtk-imquartz-commit-on-focus-out.patch',
# https://devdiv.visualstudio.com/DevDiv/_workitems/edit/737323
'patches/gtk/gtk-nsview-subview-focus-fixes.patch',
'patches/gtk/gtk-nsview-focus-tabbing.patch'
])
def prep(self):

View File

@ -0,0 +1,68 @@
diff --git a/gtk/gtknsview.c b/gtk/gtknsview.c
index 5b9961eb14..515bc369fc 100644
--- a/gtk/gtknsview.c
+++ b/gtk/gtknsview.c
@@ -739,54 +739,17 @@ gtk_ns_view_key_press (GtkWidget *widget,
GtkNSView *ns_view = GTK_NS_VIEW (widget);
NSEvent *nsevent = gdk_quartz_event_get_nsevent ((GdkEvent *) event);
- if (gtk_ns_view_forward_event (widget, event))
- {
- NSWindow *ns_window = [ns_view->priv->view window];
- NSResponder *responder = [ns_window firstResponder];
-
- gint command_mask = gdk_quartz_get_fix_modifiers () ? GDK_MOD2_MASK : GDK_MOD1_MASK;
+ if ([nsevent type] != NSEventTypeKeyDown) {
+ return GTK_WIDGET_CLASS (gtk_ns_view_parent_class)->key_press_event (widget, event);
+ }
- if ([responder isKindOfClass: [NSTextView class]] &&
- (event->state & (GDK_SHIFT_MASK | GDK_CONTROL_MASK |
- GDK_MOD1_MASK | GDK_MOD2_MASK)) == command_mask)
- {
- NSTextView *text_view = (NSTextView *) responder;
- NSRange range = [text_view selectedRange];
- gboolean has_selection = range.length > 0;
+ NSWindow *ns_window = [ns_view->priv->view window];
+ NSResponder *responder = [ns_window firstResponder];
+ if (responder) {
+ [[ns_window firstResponder] interpretKeyEvents:@[nsevent]];
- switch (event->keyval)
- {
- case GDK_KEY_c: /* copy */
- if (has_selection)
- [text_view copy: text_view];
- return TRUE;
-
- case GDK_KEY_x: /* cut */
- if (has_selection)
- [text_view cut: text_view];
- return TRUE;
-
- case GDK_KEY_v: /* paste */
- [text_view paste: text_view];
- return TRUE;
-
- case GDK_KEY_a: /* all */
- range.location = 0;
- range.length = [[text_view string] length];
- [text_view setSelectedRange: range];
- return TRUE;
-
- default:
- break;
- }
- }
- else
- {
- [ns_window sendEvent:nsevent];
-
- return TRUE;
- }
- }
+ return TRUE;
+ }
return GTK_WIDGET_CLASS (gtk_ns_view_parent_class)->key_press_event (widget, event);
}

View File

@ -0,0 +1,93 @@
diff --git a/gtk/gtknsview.c b/gtk/gtknsview.c
index a4b4dd4dbe..5b9961eb14 100644
--- a/gtk/gtknsview.c
+++ b/gtk/gtknsview.c
@@ -49,6 +49,7 @@ enum
struct _GtkNSViewPrivate
{
NSView *view;
+ NSResponder *responder;
guint map_timeout;
gboolean enable_swizzle;
};
@@ -442,15 +443,29 @@ gtk_ns_view_replace_draw_insertion_point (void)
}
}
+gboolean
+does_accept_first_responder_recursively (NSView *view)
+{
+ if ([view acceptsFirstResponder]) {
+ return TRUE;
+ }
+
+ for (NSView *subview in [view subviews]) {
+ return does_accept_first_responder_recursively (subview);
+ }
+
+ return FALSE;
+}
+
static void
gtk_ns_view_constructed (GObject *object)
{
GtkNSView *ns_view = GTK_NS_VIEW (object);
+ gboolean can_focus = does_accept_first_responder_recursively (ns_view->priv->view);
G_OBJECT_CLASS (gtk_ns_view_parent_class)->constructed (object);
- gtk_widget_set_can_focus (GTK_WIDGET (ns_view),
- [ns_view->priv->view acceptsFirstResponder]);
+ gtk_widget_set_can_focus (GTK_WIDGET (ns_view), can_focus);
#if DEBUG_FOCUS
g_printerr ("%s can focus: %d\n",
@@ -549,10 +564,12 @@ gtk_ns_view_notify (GObject *object,
gtk_widget_has_focus (GTK_WIDGET (object)));
#endif
- if (gtk_widget_has_focus (GTK_WIDGET (object)))
- [ns_window makeFirstResponder:ns_view->priv->view];
- else if ([ns_window firstResponder] == ns_view->priv->view || (GTK_IS_WINDOW (toplevel) && !gtk_window_is_active (GTK_WINDOW (toplevel))))
+ if (gtk_widget_has_focus (GTK_WIDGET (object))) {
+ [ns_window makeFirstResponder:(ns_view->priv->responder ? ns_view->priv->responder : ns_view->priv->view)];
+ // ns_view->priv->responder = NULL;
+ } else if ([ns_window firstResponder] == ns_view->priv->view || (GTK_IS_WINDOW (toplevel) && !gtk_window_is_active (GTK_WINDOW (toplevel)))) {
[ns_window makeFirstResponder:nil];
+ }
}
}
@@ -712,7 +729,7 @@ gtk_ns_view_grab_focus (GtkWidget *widget)
GTK_WIDGET_CLASS (gtk_ns_view_parent_class)->grab_focus (widget);
ns_window = [ns_view->priv->view window];
- [ns_window makeFirstResponder:ns_view->priv->view];
+ [ns_window makeFirstResponder:(ns_view->priv->responder != NULL ? ns_view->priv->responder : ns_view->priv->view)];
}
static gboolean
@@ -818,15 +835,20 @@ gtk_ns_view_native_child_event (GdkWindow *window,
if (hit &&
(hit == view ||
- [hit ancestorSharedWithView: view] == view) &&
- ([hit acceptsFirstResponder] ||
- [view acceptsFirstResponder]))
+ [hit ancestorSharedWithView: view] == view))
{
+ NSResponder *responder = (NSResponder *)hit;
+ while (responder) {
+ if ([responder acceptsFirstResponder])
+ break;
+ responder = [responder nextResponder];
+ }
#if DEBUG_FOCUS
g_printerr ("grabbing focus on %s\n",
class_getName ([ns_view->priv->view class]));
#endif
+ ns_view->priv->responder = responder;
gtk_widget_grab_focus (GTK_WIDGET (ns_view));
}
}

View File

@ -15,10 +15,14 @@ enable_language(CXX)
if(ANDROID)
# Android-NDK CMake files reconfigure the path and so Go and Perl won't be
# found. However, ninja will still find them in $PATH if we just name them.
set(PERL_EXECUTABLE "perl")
if(NOT OPENSSL_NO_ASM)
set(PERL_EXECUTABLE "perl")
endif()
# set(GO_EXECUTABLE "go")
else()
find_package(Perl REQUIRED)
if(NOT OPENSSL_NO_ASM)
find_package(Perl REQUIRED)
endif()
# find_program(GO_EXECUTABLE go)
endif()
@ -82,6 +86,8 @@ elseif(MSVC)
# (performance warning)
"C4820" # 'bytes' bytes padding added after construct 'member_name'
"C5027" # move assignment operator was implicitly defined as deleted
"C5045" # compiler will insert Spectre mitigation for memory load
# if /Qspectre switch specified
)
set(MSVC_LEVEL4_WARNINGS_LIST
# See https://connect.microsoft.com/VisualStudio/feedback/details/1217660/warning-c4265-when-using-functional-header
@ -185,7 +191,9 @@ if (ANDROID AND ${ARCH} STREQUAL "arm")
# The Android-NDK CMake files somehow fail to set the -march flag for
# assembly files. Without this flag, the compiler believes that it's
# building for ARMv5.
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=${CMAKE_SYSTEM_PROCESSOR}")
if (NOT OPENSSL_NO_ASM)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -march=${CMAKE_SYSTEM_PROCESSOR}")
endif()
endif()
# if (${ARCH} STREQUAL "x86" AND APPLE)

View File

@ -1,59 +1,65 @@
include_directories(../include)
if(APPLE)
if (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2")
endif()
set(PERLASM_STYLE macosx)
set(ASM_EXT S)
enable_language(ASM)
elseif(UNIX)
if (${ARCH} STREQUAL "aarch64")
# The "armx" Perl scripts look for "64" in the style argument
# in order to decide whether to generate 32- or 64-bit asm.
set(PERLASM_STYLE linux64)
elseif (${ARCH} STREQUAL "arm")
set(PERLASM_STYLE linux32)
elseif (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2")
set(PERLASM_STYLE elf)
if(NOT OPENSSL_NO_ASM)
if(APPLE)
if (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2")
endif()
set(PERLASM_STYLE macosx)
set(ASM_EXT S)
enable_language(ASM)
elseif(UNIX AND NOT CYGWIN)
if (${ARCH} STREQUAL "aarch64")
# The "armx" Perl scripts look for "64" in the style argument
# in order to decide whether to generate 32- or 64-bit asm.
set(PERLASM_STYLE linux64)
elseif (${ARCH} STREQUAL "arm")
set(PERLASM_STYLE linux32)
elseif (${ARCH} STREQUAL "x86")
set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2")
set(PERLASM_STYLE elf)
else()
set(PERLASM_STYLE elf)
endif()
set(ASM_EXT S)
enable_language(ASM)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
else()
set(PERLASM_STYLE elf)
if (CMAKE_CL_64 OR (CYGWIN AND ${ARCH} STREQUAL "x86_64"))
message("Using nasm")
set(PERLASM_STYLE nasm)
else()
message("Using win32n")
set(PERLASM_STYLE win32n)
set(PERLASM_FLAGS "-DOPENSSL_IA32_SSE2")
endif()
# On Windows, we use the NASM output, specifically built with Yasm.
set(ASM_EXT asm)
enable_language(ASM_NASM)
endif()
set(ASM_EXT S)
enable_language(ASM)
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
function(perlasm dest src)
add_custom_command(
OUTPUT ${dest}
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} > ${dest}
DEPENDS
${src}
${PROJECT_SOURCE_DIR}/crypto/perlasm/arm-xlate.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl
WORKING_DIRECTORY .
)
endfunction()
else()
if (CMAKE_CL_64)
message("Using nasm")
set(PERLASM_STYLE nasm)
else()
message("Using win32n")
set(PERLASM_STYLE win32n)
set(PERLASM_FLAGS "-DOPENSSL_IA32_SSE2")
endif()
# On Windows, we use the NASM output, specifically built with Yasm.
set(ASM_EXT asm)
enable_language(ASM_NASM)
function(perlasm dest src)
# Disabled since OPENSSL_NO_ASM has been defined.
endfunction()
endif()
function(perlasm dest src)
add_custom_command(
OUTPUT ${dest}
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} > ${dest}
DEPENDS
${src}
${PROJECT_SOURCE_DIR}/crypto/perlasm/arm-xlate.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl
WORKING_DIRECTORY .
)
endfunction()
# Level 0.1 - depends on nothing outside this set.
add_subdirectory(stack)
add_subdirectory(lhash)

View File

@ -1,4 +1,5 @@
include_directories(../../include)
option(ENABLE_NDK_ARM_WORKAROUND "Enable workaround for clang compiler in NDK r18+ failing to compile aes-armv4.S" OFF)
if (${ARCH} STREQUAL "x86_64")
set(
@ -29,6 +30,22 @@ if (${ARCH} STREQUAL "arm")
bsaes-armv7.${ASM_EXT}
aesv8-armx.${ASM_EXT}
)
if (ENABLE_NDK_ARM_WORKAROUND)
#
# This isn't really *for* Apple, it's for clang in general, but somebody sometime
# ago chose to use __APPLE__ because back then clang was used by default only on
# macOS. Android NDK r18 and newer dropped gcc and uses only clang, thus the need
# to work around the build issue if the symbol is not defined:
#
# [...]sdks/builds/android-armeabi-v7a-debug/mono/btls/build-shared/boringssl/crypto/aes/aes-armv4.S:363:2: error: out of range immediate fixup value
# sub r10,r3,#asm_AES_encrypt-AES_Te @ Te
# ^
# [...]sdks/builds/android-armeabi-v7a-debug/mono/btls/build-shared/boringssl/crypto/aes/aes-armv4.S:1010:2: error: out of range immediate fixup value
# sub r10,r3,#asm_AES_decrypt-AES_Td @ Td
# ^
#
add_definitions(-D__APPLE__)
endif()
endif()
if (${ARCH} STREQUAL "aarch64")

View File

@ -52,7 +52,13 @@ $code=<<___;
___
$code.=<<___ if ($flavour =~ /64/);
#if !defined(__clang__)
.arch armv8-a+crypto
.arch armv8-a+crypto
#elif defined(ANDROID) && defined(__clang__)
#if __clang_major__ > 3
.arch armv8-a+crypto
#else
.arch armv8-a+crypto,+neon
#endif
#endif
___
$code.=".arch armv7-a\n.fpu neon\n.code 32\n" if ($flavour !~ /64/);

View File

@ -60,7 +60,13 @@ $code=<<___;
___
$code.=<<___ if ($flavour =~ /64/);
#if !defined(__clang__)
.arch armv8-a+crypto
.arch armv8-a+crypto
#elif defined(ANDROID) && defined(__clang__)
#if __clang_major__ > 3
.arch armv8-a+crypto
#else
.arch armv8-a+crypto,+neon
#endif
#endif
___
$code.=".fpu neon\n.code 32\n" if ($flavour !~ /64/);

View File

@ -85,6 +85,8 @@ extern "C" {
#define OPENSSL_ARM
#elif defined(__PPC64__) || defined(__powerpc64__)
#define OPENSSL_64_BIT
#elif defined(__PPC__)
#define OPENSSL_32_BIT
#elif defined(__mips__) && !defined(__LP64__)
#define OPENSSL_32_BIT
#define OPENSSL_MIPS

View File

@ -1 +0,0 @@

View File

@ -1,95 +0,0 @@
#!/usr/bin/env python
import re
import os
import urlparse
import helix.azure_storage
import helix.event
import helix.settings
import helix.logs
log = helix.logs.get_logger()
acceptableXUnitFileNames = [
"testResults.xml",
"test-results.xml",
"test_results.xml"
]
class HelixHelper:
def __init__(self, settings):
self.settings = settings
self.event_client = helix.event.create_from_uri(settings.event_uri)
self.upload_client = helix.azure_storage.get_upload_client(settings)
def error(self, error_type, message, log_uri=None):
self.event_client.error(self.settings, error_type, message, log_uri)
def xunit(self, results_uri, test_count):
self.event_client.send(
{
'Type': 'XUnitTestResult',
'WorkItemId': self.settings.workitem_id,
'WorkItemFriendlyName': self.settings.workitem_friendly_name,
'CorrelationId': self.settings.correlation_id,
'ResultsXmlUri': results_uri,
'TestCount': test_count,
}
)
def upload_file_to_storage(self, file_path):
""" Copy file specified to azure storage account using Helix infrastructure
:param file_path: Path to file to be copied to Azure storage
:type file_path:string
"""
try:
return self.upload_client.upload(file_path, os.path.basename(file_path))
except ValueError:
self.error("FailedUpload", "Failed to upload "+file_path+"after retry")
def findXUnitResults(search_dir):
for root, dirs, files in os.walk(search_dir):
for file_name in files:
if file_name in acceptableXUnitFileNames:
return os.path.join(root, file_name)
return None
def main():
settings = helix.settings.settings_from_env()
if settings.output_uri is None or settings.event_uri is None:
log.error("Unable to report xunit results: output_uri and/or event_uri are not set.")
return 1
helper = HelixHelper(settings)
working_dir = settings.workitem_working_dir
results_path = findXUnitResults(working_dir)
if results_path is None:
log.error("Unable to report xunit results: no test results xml file found.")
return 2
log.info("Uploading results from {}".format(results_path))
with file(results_path) as result_file:
test_count = 0
total_regex = re.compile(r'total="(\d+)"')
for line in result_file:
if '<assembly ' in line:
match = total_regex.search(line)
if match is not None:
test_count = int(match.groups()[0])
break
result_url = helper.upload_file_to_storage(results_path)
log.info("Sending completion event")
helper.xunit(result_url, test_count)
return 0
if __name__ == '__main__':
import sys
sys.exit(main())

View File

@ -1,3 +0,0 @@
{
"conduit_uri" : "https://reviews.llvm.org/"
}

View File

@ -1,2 +0,0 @@
BasedOnStyle: LLVM

View File

@ -1,17 +0,0 @@
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*,-misc-unused-parameters,readability-identifier-naming'
CheckOptions:
- key: readability-identifier-naming.ClassCase
value: CamelCase
- key: readability-identifier-naming.EnumCase
value: CamelCase
- key: readability-identifier-naming.FunctionCase
value: camelBack
- key: readability-identifier-naming.MemberCase
value: CamelCase
- key: readability-identifier-naming.ParameterCase
value: CamelCase
- key: readability-identifier-naming.UnionCase
value: CamelCase
- key: readability-identifier-naming.VariableCase
value: CamelCase

View File

@ -1,12 +0,0 @@
# binary files
test/Object/Inputs/*.a-* binary
test/tools/dsymutil/Inputs/* binary
test/tools/llvm-ar/Inputs/*.lib binary
test/tools/llvm-objdump/Inputs/*.a binary
test/tools/llvm-rc/Inputs/* binary
test/tools/llvm-strings/Inputs/numbers binary
test/MC/AsmParser/incbin_abcd binary
test/YAMLParser/spec-09-02.test binary
# Windows line ending test
test/MC/AsmParser/preserve-comments-crlf.s text eol=crlf

View File

@ -1,76 +0,0 @@
#==============================================================================#
# This file specifies intentionally untracked files that git should ignore.
# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
#
# This file is intentionally different from the output of `git svn show-ignore`,
# as most of those are useless.
#==============================================================================#
#==============================================================================#
# File extensions to be ignored anywhere in the tree.
#==============================================================================#
# Temp files created by most text editors.
*~
# Merge files created by git.
*.orig
# Byte compiled python modules.
*.pyc
# vim swap files
.*.sw?
.sw?
#OS X specific files.
.DS_store
# Nested build directory
/build
#==============================================================================#
# Explicit files to ignore (only matches one).
#==============================================================================#
# Various tag programs
/tags
/TAGS
/GPATH
/GRTAGS
/GSYMS
/GTAGS
.gitusers
autom4te.cache
cscope.files
cscope.out
autoconf/aclocal.m4
autoconf/autom4te.cache
/compile_commands.json
#==============================================================================#
# Directories to ignore (do not add trailing '/'s, they skip symlinks).
#==============================================================================#
# External projects that are tracked independently.
projects/*
!projects/*.*
!projects/Makefile
runtimes/*
!runtimes/*.*
# Clang, which is tracked independently.
tools/clang
# LLDB, which is tracked independently.
tools/lldb
# lld, which is tracked independently.
tools/lld
# llgo, which is tracked independently.
tools/llgo
# Polly, which is tracked independently.
tools/polly
# avrlit, which is tracked independently.
tools/avrlit
# Sphinx build tree, if building in-source dir.
docs/_build
# VS2017 and VSCode config files.
.vscode
.vs
#==============================================================================#
# Files created in tree by the Go bindings.
#==============================================================================#
bindings/go/llvm/llvm_config.go
bindings/go/llvm/workdir

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More