Skip to content

Commit

Permalink
Extend GNU toolchain optimization options for MBS
Browse files Browse the repository at this point in the history
Add -Og and -Oz to the option enumerations for both C and C++ compilers.
  • Loading branch information
jld01 committed Jun 18, 2024
1 parent 2fbb421 commit 736862e
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.managedbuilder.gnu.ui; singleton:=true
Bundle-Version: 8.7.100.qualifier
Bundle-Version: 8.7.200.qualifier
Bundle-Activator: org.eclipse.cdt.managedbuilder.gnu.ui.GnuUIPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Expand Down
9 changes: 6 additions & 3 deletions build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2005, 2023 Texas Instruments Inc. and others.
# Copyright (c) 2005, 2024 Texas Instruments Inc. and others.
#
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
Expand All @@ -12,6 +12,7 @@
# Texas Instruments Inc. - initial API and implementation
# IBM Corporation
# John Dallaway - add library grouping option (#608)
# John Dallaway - extend optimization options (#828)
###############################################################################

# plugin names
Expand Down Expand Up @@ -136,15 +137,17 @@ Option.Posix.UndefSym=Undefined symbols (-U)
Option.Posix.InclPaths=Include paths (-I)
Option.Posix.InclFiles=Include files (-include)

Option.Posix.OptLevel=Optimization Level
Option.Posix.OptLevel=Optimization level
Option.Posix.Optimize.None=None (-O0)
Option.Posix.Optimize.Optimize=Optimize (-O1)
Option.Posix.Optimize.More=Optimize more (-O2)
Option.Posix.Optimize.Most=Optimize most (-O3)
Option.Posix.Optimize.Debug=Optimize for debug (-Og)
Option.Posix.Optimize.Size=Optimize for size (-Os)
Option.Posix.Optimize.Size.More=Optimize for size aggressively (-Oz)
Option.Posix.Optimize.Flags=Other optimization flags

Option.Posix.DebugLevel=Debug Level
Option.Posix.DebugLevel=Debug level
Option.Posix.Debug.None=None
Option.Posix.Debug.Min=Minimal (-g1)
Option.Posix.Debug.Def=Default (-g)
Expand Down
17 changes: 17 additions & 0 deletions build/org.eclipse.cdt.managedbuilder.gnu.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SPDX-License-Identifier: EPL-2.0
Contributors:
Intel Corporation - initial API and implementation
John Dallaway - add assembler debug level option (#727)
John Dallaway - extend optimization options (#828)
-->
<plugin>
<!-- Managed Make Builder Tool Specifications -->
Expand Down Expand Up @@ -1057,10 +1058,18 @@ Contributors:
name="%Option.Posix.Optimize.Most"
command="-O3"
id="gnu.c.optimization.level.most" />
<enumeratedOptionValue
command="-Og"
id="gnu.c.optimization.level.debug"
name="%Option.Posix.Optimize.Debug" />
<enumeratedOptionValue
command="-Os"
id="gnu.c.optimization.level.size"
name="%Option.Posix.Optimize.Size" />
<enumeratedOptionValue
command="-Oz"
id="gnu.c.optimization.level.size.more"
name="%Option.Posix.Optimize.Size.More" />
<enablement
type="CONTAINER_ATTRIBUTE"
attribute="defaultValue"
Expand Down Expand Up @@ -1547,10 +1556,18 @@ Contributors:
name="%Option.Posix.Optimize.Most"
command="-O3"
id="gnu.cpp.compiler.optimization.level.most" />
<enumeratedOptionValue
command="-Og"
id="gnu.cpp.compiler.optimization.level.debug"
name="%Option.Posix.Optimize.Debug" />
<enumeratedOptionValue
command="-Os"
id="gnu.cpp.compiler.optimization.level.size"
name="%Option.Posix.Optimize.Size" />
<enumeratedOptionValue
command="-Oz"
id="gnu.cpp.compiler.optimization.level.size.more"
name="%Option.Posix.Optimize.Size.More" />
<enablement
type="CONTAINER_ATTRIBUTE"
attribute="value"
Expand Down

0 comments on commit 736862e

Please sign in to comment.