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

add --debug option to setup.py #1907

Merged
merged 3 commits into from
Mar 16, 2015
Merged

add --debug option to setup.py #1907

merged 3 commits into from
Mar 16, 2015

Conversation

breznak
Copy link
Member

@breznak breznak commented Mar 4, 2015

Fixes: #1906

@breznak
Copy link
Member Author

breznak commented Mar 4, 2015

@rhyolight ok when 🍏 ?

commonCompileFlags.append("-flto-report")
commonCompileFlags.append("-fuse-ld=gold")
commonCompileFlags.append("-flto")
commonLinkFlags.append("-flto")
Copy link
Member

Choose a reason for hiding this comment

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

I would make this simpler by updating getCommandLineOption() to handle None. Then you could just make it:

if getCommandLineOption("debug", cmdOptions):
    ...
else if getCommandLineOption("optimizations-native", cmdOptions):
    ...
else if getCommandLineOption("optimizations-lto", cmdOptions):
    ...

Copy link
Member Author

@breznak breznak Mar 4, 2015 via email

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Whoops, I meant:

if getCommandLineOption("debug", cmdOptions):
    ...
else:
    if getCommandLineOption("optimizations-native", cmdOptions):
        ...
    else if getCommandLineOption("optimizations-lto", cmdOptions):
        ...

This just prevents all the null-checks and makes it easier to read.

@breznak
Copy link
Member Author

breznak commented Mar 16, 2015

Thanks @rhyolight looks better now!

rhyolight added a commit that referenced this pull request Mar 16, 2015
add --debug option to setup.py
@rhyolight rhyolight merged commit d02bba7 into numenta:master Mar 16, 2015
mihail911 pushed a commit to mihail911/nupic that referenced this pull request Aug 5, 2015
add --debug option to setup.py
@breznak breznak deleted the debug branch January 8, 2016 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add debug compile option
3 participants