summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2025-06-11 14:29:37 +1000
committerGitHub <noreply@github.com>2025-06-11 14:29:37 +1000
commit0516cf5ed85874f61944332c175e1b228fd137b2 (patch)
tree78e60115158b1d8349421672747bc0c7eb629872 /lib/python/qmk
parent802a199bbd5dc5a533d912b1e508a84d1de08724 (diff)
Specify language standard when generating compilation database. (#25354)
Diffstat (limited to 'lib/python/qmk')
-rwxr-xr-xlib/python/qmk/compilation_database.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/python/qmk/compilation_database.py b/lib/python/qmk/compilation_database.py
index 4c88dadbdd..c403297405 100755
--- a/lib/python/qmk/compilation_database.py
+++ b/lib/python/qmk/compilation_database.py
@@ -41,9 +41,9 @@ def cpu_defines(binary: str, compiler_args: str) -> List[str]:
41 if binary.endswith("gcc") or binary.endswith("g++"): 41 if binary.endswith("gcc") or binary.endswith("g++"):
42 invocation = [binary, '-dM', '-E'] 42 invocation = [binary, '-dM', '-E']
43 if binary.endswith("gcc"): 43 if binary.endswith("gcc"):
44 invocation.extend(['-x', 'c']) 44 invocation.extend(['-x', 'c', '-std=gnu11'])
45 elif binary.endswith("g++"): 45 elif binary.endswith("g++"):
46 invocation.extend(['-x', 'c++']) 46 invocation.extend(['-x', 'c++', '-std=gnu++14'])
47 compiler_args = shlex.split(compiler_args) 47 compiler_args = shlex.split(compiler_args)
48 invocation.extend(compiler_args) 48 invocation.extend(compiler_args)
49 invocation.append('-') 49 invocation.append('-')