34248d4cb7
Running make_errors.go every time a function is renamed is incredibly tedious. Plus we keep getting them wrong. Instead, sample __func__ (__FUNCTION__ in MSVC) in the OPENSSL_PUT_ERROR macro and store it alongside file and line number. This doesn't change the format of ERR_print_errors, however ERR_error_string_n now uses the placeholder "OPENSSL_internal" rather than an actual function name since that only takes the uint32_t packed error code as input. This updates err scripts to not emit the function string table. The OPENSSL_PUT_ERROR invocations, for now, still include the extra parameter. That will be removed in a follow-up. BUG=468039 Change-Id: Iaa2ef56991fb58892fa8a1283b3b8b995fbb308d Reviewed-on: https://boringssl-review.googlesource.com/5275 Reviewed-by: Adam Langley <agl@google.com>
50 lines
784 B
CMake
50 lines
784 B
CMake
include_directories(. .. ../../include)
|
|
|
|
add_custom_command(
|
|
OUTPUT err_data.c
|
|
COMMAND ${GO_EXECUTABLE} run err_data_generate.go > ${CMAKE_CURRENT_BINARY_DIR}/err_data.c
|
|
DEPENDS
|
|
err_data_generate.go
|
|
asn1.errordata
|
|
bio.errordata
|
|
bn.errordata
|
|
cipher.errordata
|
|
conf.errordata
|
|
dh.errordata
|
|
digest.errordata
|
|
dsa.errordata
|
|
ecdh.errordata
|
|
ecdsa.errordata
|
|
ec.errordata
|
|
engine.errordata
|
|
evp.errordata
|
|
hkdf.errordata
|
|
obj.errordata
|
|
pem.errordata
|
|
pkcs8.errordata
|
|
rsa.errordata
|
|
ssl.errordata
|
|
x509.errordata
|
|
x509v3.errordata
|
|
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
add_library(
|
|
err
|
|
|
|
OBJECT
|
|
|
|
err.c
|
|
err_data.c
|
|
)
|
|
|
|
add_executable(
|
|
err_test
|
|
|
|
err_test.cc
|
|
|
|
$<TARGET_OBJECTS:test_support>
|
|
)
|
|
|
|
target_link_libraries(err_test crypto)
|