зеркало из https://github.com/microsoft/SymCrypt.git
Merged PR 11000448: Tidying and small build fixes
- !10935012 added a `.gitattributes` file to try to enforce consistent Windows-style line endings, but this causes a bunch of spurious diffs to show up after checking out the latest branch (ironically, on Windows only). See [this Stack Overflow question](https://stackoverflow.com/questions/5787937/git-status-shows-files-as-changed-even-though-contents-are-the-same) which refers to a similar issue. After fighting with Git for a bit, it seems like the easiest fix is just to remove this file. - Workaround for Python versions < 3.11 not being able to parse timestamps with the 'Z' suffix indicating UTC time (started breaking our pipeline builds due to a recent Git version update) - Fix for Python 3.12 complaining about invalid escape characters in `symcryptasm_processor.py` (use raw strings) - When building OpenSSL, pin to a specific tag if no branch is specified on the command line, so that we're not building against a moving target
This commit is contained in:
Родитель
9531d00a19
Коммит
84c69fcda1
|
@ -1 +0,0 @@
|
|||
* text eol=crlf
|
|
@ -5,10 +5,10 @@ if(OPENSSL_BUILD_FROM_SOURCE)
|
|||
set(OPENSSL_BUILD_TYPE debug)
|
||||
endif()
|
||||
if(NOT DEFINED OPENSSL_BUILD_BRANCH)
|
||||
set(OPENSSL_BUILD_BRANCH_SUFFIX "")
|
||||
else()
|
||||
set(OPENSSL_BUILD_BRANCH_SUFFIX -${OPENSSL_BUILD_BRANCH})
|
||||
set(OPENSSL_BUILD_BRANCH "openssl-3.3.1")
|
||||
endif()
|
||||
|
||||
set(OPENSSL_BUILD_BRANCH_SUFFIX -${OPENSSL_BUILD_BRANCH})
|
||||
|
||||
set(OPENSSL_BUILD_ROOT ${SYMCRYPT_SOURCE_DIR}/3rdparty/openssl-${OPENSSL_BUILD_TYPE}${OPENSSL_BUILD_BRANCH_SUFFIX})
|
||||
|
||||
|
|
|
@ -888,13 +888,13 @@ GAS_ALTERNATE_ENTRY = "%s: .global %s\n"
|
|||
ARMASM64_ALTERNATE_ENTRY= " ALTERNATE_ENTRY %s\n"
|
||||
|
||||
|
||||
FUNCTION_START_PATTERN = re.compile("\s*(NESTED_)?(MUL_)?FUNCTION_START\s*\(\s*([a-zA-Z0-9_\(\)]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*(,\s*[0-9\*\+\-]+)?\s*(,\s*[0-9]+)?\s*\)")
|
||||
FUNCTION_END_PATTERN = re.compile("\s*(NESTED_)?(MUL_)?FUNCTION_END\s*\(\s*([a-zA-Z0-9_\(\)]+)\s*\)")
|
||||
GET_MEMSLOT_PATTERN = re.compile("GET_MEMSLOT_OFFSET\s*\(\s*slot([0-9]+)\s*\)")
|
||||
ALTERNATE_ENTRY_PATTERN = re.compile("\s*ALTERNATE_ENTRY\s*\(\s*([a-zA-Z0-9_\(\)]+)\s*\)")
|
||||
MACRO_START_PATTERN = re.compile("\s*MACRO_START\s*\(\s*([A-Z_0-9]+)\s*,([^\)]+)\)")
|
||||
MACRO_END_PATTERN = re.compile("\s*MACRO_END\s*\(\s*\)")
|
||||
INCLUDE_PATTERN = re.compile("\s*INCLUDE\s*\(\s*([^\s]+)\s*\)")
|
||||
FUNCTION_START_PATTERN = re.compile(r"\s*(NESTED_)?(MUL_)?FUNCTION_START\s*\(\s*([a-zA-Z0-9_\(\)]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*(,\s*[0-9\*\+\-]+)?\s*(,\s*[0-9]+)?\s*\)")
|
||||
FUNCTION_END_PATTERN = re.compile(r"\s*(NESTED_)?(MUL_)?FUNCTION_END\s*\(\s*([a-zA-Z0-9_\(\)]+)\s*\)")
|
||||
GET_MEMSLOT_PATTERN = re.compile(r"GET_MEMSLOT_OFFSET\s*\(\s*slot([0-9]+)\s*\)")
|
||||
ALTERNATE_ENTRY_PATTERN = re.compile(r"\s*ALTERNATE_ENTRY\s*\(\s*([a-zA-Z0-9_\(\)]+)\s*\)")
|
||||
MACRO_START_PATTERN = re.compile(r"\s*MACRO_START\s*\(\s*([A-Z_0-9]+)\s*,([^\)]+)\)")
|
||||
MACRO_END_PATTERN = re.compile(r"\s*MACRO_END\s*\(\s*\)")
|
||||
INCLUDE_PATTERN = re.compile(r"\s*INCLUDE\s*\(\s*([^\s]+)\s*\)")
|
||||
|
||||
class ProcessingStateMachine:
|
||||
"""A class to hold the state when processing a file and handle files line by line"""
|
||||
|
|
|
@ -87,6 +87,10 @@ def get_commit_info() -> Tuple[str, str, datetime.datetime]:
|
|||
except subprocess.CalledProcessError as e:
|
||||
print("git exited unsuccessfully with code {}".format(str(e.returncode)), file = sys.stderr)
|
||||
exit(e.returncode)
|
||||
# Workaround for Python < 3.11 not supporting the 'Z' suffix for UTC timestamps
|
||||
if version_commit_timestamp.endswith("Z"):
|
||||
version_commit_timestamp = version_commit_timestamp[:-1] + "+00:00"
|
||||
|
||||
version_commit_timestamp = datetime.datetime.fromisoformat(version_commit_timestamp)
|
||||
|
||||
finally:
|
||||
|
|
Загрузка…
Ссылка в новой задаче