diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-20 13:40:20 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-22 12:41:23 +0000 |
commit | 7961cea6d1041e3e454dae6a1da660b453efd238 (patch) | |
tree | c0eeb4a9ff9ba32986289c1653d9608e53ccb444 /chromium/third_party/nasm | |
parent | b7034d0803538058e5c9d904ef03cf5eab34f6ef (diff) | |
download | qtwebengine-chromium-7961cea6d1041e3e454dae6a1da660b453efd238.tar.gz |
BASELINE: Update Chromium to 78.0.3904.130
Change-Id: If185e0c0061b3437531c97c9c8c78f239352a68b
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/nasm')
-rw-r--r-- | chromium/third_party/nasm/README.patches | 44 | ||||
-rwxr-xr-x | chromium/third_party/nasm/find_patches.py | 3 | ||||
-rw-r--r-- | chromium/third_party/nasm/include/compiler.h | 7 | ||||
-rw-r--r-- | chromium/third_party/nasm/include/ilog2.h | 6 |
4 files changed, 54 insertions, 6 deletions
diff --git a/chromium/third_party/nasm/README.patches b/chromium/third_party/nasm/README.patches index 9c63038297c..dffdbc0e59d 100644 --- a/chromium/third_party/nasm/README.patches +++ b/chromium/third_party/nasm/README.patches @@ -26,9 +26,9 @@ Affects: nasmlib/ver.c ------------------------------------------------------------------ -commit e5417246fc34b430f241f055b8b9570f5d9ab2c3 +commit 4ee6a69ce33be1e96fd3c44a6e3ae3d8177453da Author: Dale Curtis <dalecurtis@chromium.org> -Date: Mon Nov 19 13:50:47 2018 -0800 +Date: Mon Nov 19 13:52:05 2018 -0800 Remove uses of time(NULL) for build determism. @@ -37,7 +37,45 @@ Date: Mon Nov 19 13:50:47 2018 -0800 BUG=766721 TEST=none + Change-Id: I88c11d052aef8a9c4e48b3b976ad432f3b008dd6 + Affects: - output/outcoff.c asm/nasm.c + output/outcoff.c + +------------------------------------------------------------------ +commit dff67a9842e4ab6699598d75691a630df090e7f5 +Author: Reid Kleckner <rnk@google.com> +Date: Tue Aug 6 15:16:16 2019 -0700 + + Fix extern_inline for MSVC and clang-cl + + Prior to this change, no inline function bodies would be provided for + MSVC. This change fixes that, so nasm will be slightly faster. + + With clang-cl, however, there would be LNK4006 warnings if the compiler + chooses not to inline the ilog2 functions. The easiest way to observe + this is with `nmake /f Mkfiles/msvc.mak CC=clang-cl DEBUG=1`. This + disables inlining, and I see this at the end of the link: + ilog2.obj : warning LNK4006: ilog2_32 already defined in outmacho.obj; second definition ignored + ilog2.obj : warning LNK4006: ilog2_64 already defined in eval.obj; second definition ignored + ilog2.obj : warning LNK4006: alignlog2_32 already defined in outmacho.obj; second definition ignored + + When additional instrumentation (-fprofile-instr-generate) is enabled, + the warning can become an error, as we discovered in + https://crbug.com/989745. + + MSVC and compilers pretending to be MSVC (clang-cl) implement inline in + C with C++ semantics. In C++, inline functions are emitted by the + compiler whenever they are needed and the linker discards duplicate + inline function definitions. This change adds a new HAVE_MSVC_INLINE + macro and adjusts the ifdefs to handle this mode. I chose to keep + ilog2.c as part of the build, and to have it emit duplicate definitions + of all the inline functions. An alternative solution would be to exclude + it from the build, but I felt it was best to solve this in source code + instead of the build system. + +Affects: + include/compiler.h + include/ilog2.h diff --git a/chromium/third_party/nasm/find_patches.py b/chromium/third_party/nasm/find_patches.py index f579fcdc70d..3a9f87c03bd 100755 --- a/chromium/third_party/nasm/find_patches.py +++ b/chromium/third_party/nasm/find_patches.py @@ -255,7 +255,8 @@ def write_patches_file(origin_branch, output_file): print("\nAffects:", file=output_file) # TODO(liberato): maybe add the lines that were affected. for file in sorted(sha1ToFiles[sha1]): - print(" " + os.path.relpath(file, wd), file=output_file) + relfile = os.path.relpath(file, wd).replace('\\', '/') + print(" " + relfile, file=output_file) print(file=output_file) log("Done") diff --git a/chromium/third_party/nasm/include/compiler.h b/chromium/third_party/nasm/include/compiler.h index 4178c98edec..fa63fea0174 100644 --- a/chromium/third_party/nasm/include/compiler.h +++ b/chromium/third_party/nasm/include/compiler.h @@ -224,6 +224,11 @@ size_t strnlen(const char *s, size_t maxlen); # elif defined(__GNUC_GNU_INLINE__) /* Some other compiler implementing only GNU inline semantics? */ # define HAVE_GNU_INLINE +# elif defined(_MSC_VER) +/* In MSVC and clang when it is pretending to be MSVC, inline behaves it does in + * C++. + */ +# define HAVE_MSVC_INLINE # elif defined(__STDC_VERSION__) # if __STDC_VERSION__ >= 199901L # define HAVE_STDC_INLINE @@ -236,6 +241,8 @@ size_t strnlen(const char *s, size_t maxlen); #elif defined(HAVE_GNU_INLINE) # define extern_inline extern inline # define inline_prototypes +#elif defined(HAVE_MSVC_INLINE) +# define extern_inline inline #else # define inline_prototypes #endif diff --git a/chromium/third_party/nasm/include/ilog2.h b/chromium/third_party/nasm/include/ilog2.h index 3a828be8f46..295ca3f6d41 100644 --- a/chromium/third_party/nasm/include/ilog2.h +++ b/chromium/third_party/nasm/include/ilog2.h @@ -38,8 +38,10 @@ #include <limits.h> #ifdef ILOG2_C /* For generating the out-of-line functions */ -# undef extern_inline -# define extern_inline +# ifndef HAVE_MSVC_INLINE +# undef extern_inline +# define extern_inline +# endif # define inline_prototypes #endif |