Skip to content

Commit ba3de4d

Browse files
divVerentBoringssl LUCI CQ
authored andcommitted
Reapply "Simplify the symbol prefixing macros."
This reverts commit 9b4d8692731864f624593083326c407a8fe25ba4. The headers are now always included, but check for BORINGSSL_PREFIX themselves; also, the macros use less case distinctions now. This reduces the RAM usage of the compiler, but also is generally nicer in the sense that it now properly autodetects the need to prepend an underscore rather than relying on Apple vs non-Apple. It also is part of a potential workaround to use the #pragma redefine_extname together with precompiled headers. Update-Note: <openssl/prefix_symbols.h> is now always included. Downstream build systems may need changes to add this file to the build dependencies. Similarly, nasm files now always include "boringssl_prefix_symbols_internal_*.inc" from gen/, and thus build systems may need to add the directory to the include path. Now the Chromium build should have been fixed. Bug: 42220000 Change-Id: I9bf318e4d80a21aaa4f053bb17249bd96a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/90408 Reviewed-by: Xiangfei Ding <xfding@google.com> Commit-Queue: Xiangfei Ding <xfding@google.com>
1 parent 6453bd8 commit ba3de4d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+3795
-3808
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ if(BORINGSSL_PREFIX)
8282
# but not add_definitions.
8383
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -DBORINGSSL_PREFIX=${BORINGSSL_PREFIX}")
8484
set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -DBORINGSSL_PREFIX=${BORINGSSL_PREFIX}")
85-
86-
# Also add the generated files to NASM's includes. With a final slash for NASM 2.
87-
set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/gen/")
8885
endif()
8986

87+
# Add the generated files to NASM's includes. With a final slash for NASM 2.
88+
set(CMAKE_ASM_NASM_FLAGS "${CMAKE_ASM_NASM_FLAGS} -I${CMAKE_CURRENT_SOURCE_DIR}/gen/")
89+
9090
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
9191
set(CLANG 1)
9292
endif()

crypto/perlasm/x86_64-xlate.pl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,9 +1341,7 @@
13411341
\%define ZMMWORD
13421342
\%define _CET_ENDBR
13431343
1344-
\%ifdef BORINGSSL_PREFIX
13451344
\%include "boringssl_prefix_symbols_internal_x86_64_win_asm.inc"
1346-
\%endif
13471345
___
13481346
} elsif ($masm) {
13491347
print <<___;

crypto/perlasm/x86asm.pl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,8 @@ sub ::asm_finish
291291
___
292292
if ($win32) {
293293
print <<___ unless $masm;
294-
\%ifdef BORINGSSL_PREFIX
295294
\%include "boringssl_prefix_symbols_internal_x86_win_asm.inc"
296-
\%endif
295+
297296
\%ifidn __OUTPUT_FORMAT__, win32
298297
___
299298
print @out;

gen/bcm/aes-gcm-avx2-x86_64-win.asm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ default rel
88
%define ZMMWORD
99
%define _CET_ENDBR
1010

11-
%ifdef BORINGSSL_PREFIX
1211
%include "boringssl_prefix_symbols_internal_x86_64_win_asm.inc"
13-
%endif
1412
section .rdata rdata align=8
1513
ALIGN 16
1614

gen/bcm/aes-gcm-avx512-x86_64-win.asm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ default rel
88
%define ZMMWORD
99
%define _CET_ENDBR
1010

11-
%ifdef BORINGSSL_PREFIX
1211
%include "boringssl_prefix_symbols_internal_x86_64_win_asm.inc"
13-
%endif
1412
section .rdata rdata align=8
1513
ALIGN 64
1614

gen/bcm/aesni-gcm-x86_64-win.asm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ default rel
88
%define ZMMWORD
99
%define _CET_ENDBR
1010

11-
%ifdef BORINGSSL_PREFIX
1211
%include "boringssl_prefix_symbols_internal_x86_64_win_asm.inc"
13-
%endif
1412
section .text code align=64
1513

1614

gen/bcm/aesni-x86-win.asm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
; This file is generated from a similarly-named Perl script in the BoringSSL
22
; source tree. Do not edit by hand.
33

4-
%ifdef BORINGSSL_PREFIX
54
%include "boringssl_prefix_symbols_internal_x86_win_asm.inc"
6-
%endif
5+
76
%ifidn __OUTPUT_FORMAT__, win32
87
%ifidn __OUTPUT_FORMAT__,obj
98
section code use32 class=code align=64

gen/bcm/aesni-x86_64-win.asm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ default rel
88
%define ZMMWORD
99
%define _CET_ENDBR
1010

11-
%ifdef BORINGSSL_PREFIX
1211
%include "boringssl_prefix_symbols_internal_x86_64_win_asm.inc"
13-
%endif
1412
section .text code align=64
1513

1614
global aes_hw_encrypt

gen/bcm/bn-586-win.asm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
; This file is generated from a similarly-named Perl script in the BoringSSL
22
; source tree. Do not edit by hand.
33

4-
%ifdef BORINGSSL_PREFIX
54
%include "boringssl_prefix_symbols_internal_x86_win_asm.inc"
6-
%endif
5+
76
%ifidn __OUTPUT_FORMAT__, win32
87
%ifidn __OUTPUT_FORMAT__,obj
98
section code use32 class=code align=64

gen/bcm/co-586-win.asm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
; This file is generated from a similarly-named Perl script in the BoringSSL
22
; source tree. Do not edit by hand.
33

4-
%ifdef BORINGSSL_PREFIX
54
%include "boringssl_prefix_symbols_internal_x86_win_asm.inc"
6-
%endif
5+
76
%ifidn __OUTPUT_FORMAT__, win32
87
%ifidn __OUTPUT_FORMAT__,obj
98
section code use32 class=code align=64

0 commit comments

Comments
 (0)