зеркало из https://github.com/electron/electron.git
build: fix clang format location helper (again) (#42911)
This commit is contained in:
Родитель
f575e52586
Коммит
81351dd1a9
|
@ -194,6 +194,9 @@ def get_buildtools_executable(name):
|
||||||
chromium_platform = 'linux64'
|
chromium_platform = 'linux64'
|
||||||
else:
|
else:
|
||||||
raise Exception(f"Unsupported platform: {sys.platform}")
|
raise Exception(f"Unsupported platform: {sys.platform}")
|
||||||
|
|
||||||
|
if name == 'clang-format':
|
||||||
|
chromium_platform += '-format'
|
||||||
|
|
||||||
path = os.path.join(buildtools, chromium_platform, name)
|
path = os.path.join(buildtools, chromium_platform, name)
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
|
|
|
@ -23,7 +23,7 @@ import traceback
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
from functools import partial
|
from functools import partial
|
||||||
from lib.util import get_depot_tools_executable
|
from lib.util import get_buildtools_executable
|
||||||
|
|
||||||
DEFAULT_EXTENSIONS = 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx,mm'
|
DEFAULT_EXTENSIONS = 'c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx,mm'
|
||||||
DEFAULT_CLANG_FORMAT_IGNORE = '.clang-format-ignore'
|
DEFAULT_CLANG_FORMAT_IGNORE = '.clang-format-ignore'
|
||||||
|
@ -203,7 +203,7 @@ def main():
|
||||||
'--clang-format-executable',
|
'--clang-format-executable',
|
||||||
metavar='EXECUTABLE',
|
metavar='EXECUTABLE',
|
||||||
help='path to the clang-format executable',
|
help='path to the clang-format executable',
|
||||||
default=get_depot_tools_executable('clang-format'))
|
default=get_buildtools_executable('clang-format'))
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
'--extensions',
|
'--extensions',
|
||||||
help='comma-separated list of file extensions'
|
help='comma-separated list of file extensions'
|
||||||
|
|
Загрузка…
Ссылка в новой задаче