Skip to content

Commit c3a71eb

Browse files
committed
µVision export: Handle more C++ language standards
µVision 5.28a now has options for gnu++14, c++14 and c++17, so we can use them rather than falling back to c++14 or gnu++11. This does mean that an export of current master, which uses gnu++14, will now require version 5.28a. I have not tested what happens if 5.27 is given a project file with these new option numbers. However, export of current master is broken for 5.27 anyway, as the fallback to gnu++11 means it fails to compile the C++14 constructs now in the codebase. Fixes #11217, as long as users update µVision too.
1 parent f8dc035 commit c3a71eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/export/uvision/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,10 @@ def generate(self):
309309
std = None
310310
cpp_std = {
311311
'c++98': 1, 'gnu++98': 2,
312-
'c++03': 5, 'gnu++03': 2, # UVision 5.27.1.0 does not support gnu++03 - fall back to gnu++98
312+
'c++03': 5, 'gnu++03': 2, # UVision 5.28 does not support gnu++03 - fall back to gnu++98
313313
'c++11': 3, 'gnu++11': 4,
314-
'c++14': 6, 'gnu++14': 4, # UVision 5.27.1.0 does not support gnu++14 - should be able to get it as compiler default, but that doesn't work as documented and requests gnu++98. So fall back to gnu++11
315-
'c++17': 6, 'gnu++17': 4, # UVision 5.27.1.0 does not support c++17/gnu++17 - fall back to c++14/gnu++11
314+
'c++14': 6, 'gnu++14': 7, # UVision 5.28 or later is required for gnu++14, c++14 or gnu++17
315+
'c++17': 8, 'gnu++17': 9,
316316
}
317317
ctx['v6_lang_p'] = cpp_std.get(std, 0)
318318

0 commit comments

Comments
 (0)