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

Investigate the right set of C compilation flags #117

Open
lmazuel opened this issue Nov 21, 2019 · 0 comments
Open

Investigate the right set of C compilation flags #117

lmazuel opened this issue Nov 21, 2019 · 0 comments

Comments

@lmazuel
Copy link
Member

lmazuel commented Nov 21, 2019

Right now, the setup.py passes "-g -O0" while CMake is passing "-O2"

x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/azure-uamqp-python/src/vendor/inc -I./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/inc -I./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/inc -I./src/vendor/azure-uamqp-c/inc -I./src/vendor/azure-uamqp-c/deps/azure-c-shared-utility/pal/linux -I/azure-uamqp-python/env/include -I/usr/include/python3.6m -c uamqp/c_uamqp.c -o build/temp.linux-x86_64-3.6/uamqp/c_uamqp.o -g -O0 -std=gnu99 -fPIC

It's unclear without being a gcc expert in what optimisation levels the lib is actually compiled.

Wheel should be the most possible optimized for performance. We might consider adding a "DEBUG_COMPILE" env variable read by the setup.py to compile in debug mode for easier debugging. That's actually changing this line (necessary, maybe not sufficient):

"-DCMAKE_BUILD_TYPE=Release"

to

"-DCMAKE_BUILD_TYPE=Debug"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant