mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-16 12:51:47 +00:00
Specify language standard when generating compilation database. (#25354)
This commit is contained in:
parent
802a199bbd
commit
0516cf5ed8
@ -41,9 +41,9 @@ def cpu_defines(binary: str, compiler_args: str) -> List[str]:
|
||||
if binary.endswith("gcc") or binary.endswith("g++"):
|
||||
invocation = [binary, '-dM', '-E']
|
||||
if binary.endswith("gcc"):
|
||||
invocation.extend(['-x', 'c'])
|
||||
invocation.extend(['-x', 'c', '-std=gnu11'])
|
||||
elif binary.endswith("g++"):
|
||||
invocation.extend(['-x', 'c++'])
|
||||
invocation.extend(['-x', 'c++', '-std=gnu++14'])
|
||||
compiler_args = shlex.split(compiler_args)
|
||||
invocation.extend(compiler_args)
|
||||
invocation.append('-')
|
||||
|
Loading…
Reference in New Issue
Block a user