summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Hesling <hesling@chromium.org>2020-12-15 12:20:52 -0800
committerCommit Bot <commit-bot@chromium.org>2020-12-15 21:35:09 +0000
commit49a18c25f8351d232a0065c67297a954caee8414 (patch)
tree575270e3791566748b54f2234e357b85d415405b
parent30ba1a28dc305aa31411695832a47e24c5a864b3 (diff)
downloadchrome-ec-49a18c25f8351d232a0065c67297a954caee8414.tar.gz
util/ide-config.sh: Fix invalid cStandard c18
I'm not sure what changed, but VSCode doesn't recognize "c18". The next best option is c17 or gnu17. The original change to c18 was commit 971e1b069f077141e13577b11898b18e8cb739f2. BRANCH=none BUG=none TEST=./util/ide-config.sh vscode all:RW all:RO | tee .vscode/c_cpp_properties.json # Check that VSCode is happy with gnu17 in # .vscode/c_cpp_properties.json. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I6797898dc7b546f805de43e07457a98ba22cc9ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593917 Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
-rwxr-xr-xutil/ide-config.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/ide-config.sh b/util/ide-config.sh
index 03928065a7..25edca2407 100755
--- a/util/ide-config.sh
+++ b/util/ide-config.sh
@@ -231,7 +231,9 @@ vscode() {
echo '"compilerPath": "/usr/bin/arm-none-eabi-gcc",'
# echo '"compilerArgs": [],'
# The macro __STDC_VERSION__ is 201710L, which corresponds to c18.
- echo '"cStandard": "c18",'
+ # VSCode doesn't have a C18 option, so go with C17. Since we seem
+ # to use a lot of GNUC features, let's go with gnu17 instead of c17.
+ echo '"cStandard": "gnu17",'
# echo '"cppStandard": "c++17",'
echo '"intelliSenseMode": "gcc-x64"'
} | {