mirror of
https://github.com/clangd/clangd.git
synced 2025-06-07 08:44:58 +00:00
Address comments (except main, so far)
This commit is contained in:
parent
3bf5d201a2
commit
73d33422ce
21
.github/workflows/lib_compat_test.py
vendored
21
.github/workflows/lib_compat_test.py
vendored
@ -19,21 +19,18 @@ args = parser.parse_args()
|
||||
# Parses GLIBC_2.3 into ("GLIBC", [2,3])
|
||||
# Parses GLIBC into ("GLIBC", None)
|
||||
def parse_version(version):
|
||||
parts = version.split('_', 1)
|
||||
parts = version.rsplit('_', 1)
|
||||
if len(parts) == 1:
|
||||
return (version, None)
|
||||
try:
|
||||
return (parts[0], [int(p) for p in parts[1].split('.')])
|
||||
except ValueError:
|
||||
return (version, None)
|
||||
|
||||
lib_versions = dict([parse_version(v) for v in args.lib])
|
||||
|
||||
# Determines whether an optionally-versioned symbol is acceptable.
|
||||
def accept_symbol(sym):
|
||||
if sym in args.sym:
|
||||
return True
|
||||
split = sym.split('@', 1)
|
||||
return (split[0] in args.sym) or (len(split) == 2 and accept_lib(split[1]))
|
||||
|
||||
# Determines whether all symbols with version 'lib' are acceptable.
|
||||
# A versioned library is name_x.y.z by convention.
|
||||
def accept_lib(lib):
|
||||
(lib, ver) = parse_version(lib)
|
||||
if not lib in lib_versions: # Non-whitelisted library.
|
||||
@ -44,6 +41,14 @@ def accept_lib(lib):
|
||||
return False
|
||||
return ver <= lib_versions[lib]
|
||||
|
||||
# Determines whether an optionally-versioned symbol is acceptable.
|
||||
# A versioned symbol is symbol@version as output by nm.
|
||||
def accept_symbol(sym):
|
||||
if sym in args.sym:
|
||||
return True
|
||||
split = sym.split('@', 1)
|
||||
return (split[0] in args.sym) or (len(split) == 2 and accept_lib(split[1]))
|
||||
|
||||
# Run nm to find the undefined symbols, and check whether each is acceptable.
|
||||
nm = subprocess.run(['nm', '-uD', '--with-symbol-version', args.binary],
|
||||
stdout=subprocess.PIPE, text=True)
|
||||
|
@ -8,7 +8,8 @@ is being able to cut releases easily whenever we want.
|
||||
The releases are just a zip archive containing the `clangd` binary, and the
|
||||
clang builtin headers. They should be runnable immediately after extracting the
|
||||
archive. The linux binary has `libstdc++` and other dependencies statically
|
||||
linked for maximum portability.
|
||||
linked for maximum portability, and requires glibc 2.18 (the first version with
|
||||
`thread_local` support).
|
||||
|
||||
## Creating a release manually
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user