Skip to content

[C++] Remove -g flag in release builds #16244

Closed

Description

@asfimport

See SetupCxxFlags.cmake

Reporter: Wes McKinney / @wesm
Assignee: Wes McKinney / @wesm

Related issues:

Note: This issue was originally created as ARROW-616. Please see the migration documentation for further details.

Activity

  1. asfimport commented on Apr 1, 2017

    @asfimport
    Author

    Wes McKinney / @wesm:
    I'm pretty amazed by the difference in size of the binaries with and without debugging symbols.

    With debugging symbols:

    -rw-rw-r-- 1 wesm wesm 15334186 Apr  1 16:15 libarrow.a
    -rw-rw-r-- 1 wesm wesm    24776 Apr  1 16:15 libarrow_benchmark_main.a
    -rw-rw-r-- 1 wesm wesm  2143544 Apr  1 16:15 libarrow_io.a
    lrwxrwxrwx 1 wesm wesm       16 Apr  1 16:15 libarrow_io.so -> libarrow_io.so.0*
    lrwxrwxrwx 1 wesm wesm       20 Apr  1 16:15 libarrow_io.so.0 -> libarrow_io.so.0.0.0*
    -rwxrwxr-x 1 wesm wesm  1094904 Apr  1 16:15 libarrow_io.so.0.0.0*
    -rw-rw-r-- 1 wesm wesm 11654780 Apr  1 16:15 libarrow_ipc.a
    lrwxrwxrwx 1 wesm wesm       17 Apr  1 16:15 libarrow_ipc.so -> libarrow_ipc.so.0*
    lrwxrwxrwx 1 wesm wesm       21 Apr  1 16:15 libarrow_ipc.so.0 -> libarrow_ipc.so.0.0.0*
    -rwxrwxr-x 1 wesm wesm  5633194 Apr  1 16:15 libarrow_ipc.so.0.0.0*
    lrwxrwxrwx 1 wesm wesm       13 Apr  1 16:15 libarrow.so -> libarrow.so.0*
    lrwxrwxrwx 1 wesm wesm       17 Apr  1 16:15 libarrow.so.0 -> libarrow.so.0.0.0*
    -rwxrwxr-x 1 wesm wesm  7974868 Apr  1 16:15 libarrow.so.0.0.0*
    -rw-rw-r-- 1 wesm wesm    36030 Apr  1 16:15 libarrow_test_main.a

    without

    -rw-rw-r-- 1 wesm wesm  1870514 Apr  1 16:16 libarrow.a
    -rw-rw-r-- 1 wesm wesm     1984 Apr  1 16:16 libarrow_benchmark_main.a
    -rw-rw-r-- 1 wesm wesm   322640 Apr  1 16:16 libarrow_io.a
    lrwxrwxrwx 1 wesm wesm       16 Apr  1 16:16 libarrow_io.so -> libarrow_io.so.0*
    lrwxrwxrwx 1 wesm wesm       20 Apr  1 16:16 libarrow_io.so.0 -> libarrow_io.so.0.0.0*
    -rwxrwxr-x 1 wesm wesm   184888 Apr  1 16:16 libarrow_io.so.0.0.0*
    -rw-rw-r-- 1 wesm wesm  1133796 Apr  1 16:16 libarrow_ipc.a
    lrwxrwxrwx 1 wesm wesm       17 Apr  1 16:16 libarrow_ipc.so -> libarrow_ipc.so.0*
    lrwxrwxrwx 1 wesm wesm       21 Apr  1 16:16 libarrow_ipc.so.0 -> libarrow_ipc.so.0.0.0*
    -rwxrwxr-x 1 wesm wesm   599186 Apr  1 16:16 libarrow_ipc.so.0.0.0*
    lrwxrwxrwx 1 wesm wesm       13 Apr  1 16:16 libarrow.so -> libarrow.so.0*
    lrwxrwxrwx 1 wesm wesm       17 Apr  1 16:16 libarrow.so.0 -> libarrow.so.0.0.0*
    -rwxrwxr-x 1 wesm wesm   904100 Apr  1 16:16 libarrow.so.0.0.0*
    -rw-rw-r-- 1 wesm wesm     2350 Apr  1 16:16 libarrow_test_main.a

    My understanding is that the debug symbols don't impact performance, and we lose the ability to debug core dumps from release builds without them. Any thoughts or opinions?

  2. asfimport commented on Apr 20, 2017

    @asfimport
    Author

    Wes McKinney / @wesm:
    Since conda packages for Arrow C++ libraries are now growing to about 15MB, I think it may be good to strip debug symbols by default in release builds. They can be added back with ARROW_CXXFLAGS – @xhochy do you have opinions one way or the other? The Linux wheels for 0.2.0 were about 13MB, so these would get smaller, too (https://pypi.python.org/pypi/pyarrow)

  3. asfimport commented on Apr 20, 2017

    @asfimport
    Author

    Uwe Korn / @xhochy:
    Feel free to remove them, it's not that hard at least for me to produce wheels again that contain debug symbols that I could then hand out to users if there is a problem.

  4. asfimport commented on Apr 20, 2017

    @asfimport
    Author
  5. asfimport commented on Apr 21, 2017

    @asfimport
    Author

    Wes McKinney / @wesm:
    Issue resolved by pull request 574
    #574

  6. added this to the 0.3.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions