Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build gcc.debug using -Og flag #577

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,11 @@ def config_env(toolchain, variant, env):
env.Append(CPPDEFINES={
'_FORTIFY_SOURCE': 2
})
# Build debuggable but still optimized executable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Splendid idea, I learned something new.

Correct indentation please on line 376 (4 columns to the right) - or you could even write it in one line as:

env.Append(CCFLAGS='-Og')

(scons doesn't need the list brackets when it's only a single item...)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just left it like this, since on lines 288, 323 and 328 a single item list is also split up into several lines... It might be useful if in the future additional flags are added and people don't have to "learn scons" to extend the list or start doing weird hacks like env.Append(CCFLAGS='-Og -Foo -Bar').

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly.

# via -Og switch introduced in GCC 4.8
env.Append(CCFLAGS=[
'-Og'
])

elif toolchain == 'msvc':
env.Append (CPPPATH=[
Expand Down