Commit Graph

4 Commits

Author SHA1 Message Date
Jun Wu
004e19698b setup: add a command to remove extra build files
Summary:
I noticed that cdatapack.o was not cleaned with `make clean`. And `.c`
generated by Cython should also be cleaned to avoid surprise.

Since the latter cannot be done cleanly using short shell script, write the
clean logic in Python.

Test Plan: `make clean`

Reviewers: #sourcecontrol, rmcelroy

Reviewed By: rmcelroy

Subscribers: rmcelroy, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4979676

Signature: t1:4979676:1493717290:a826da9e50bcd67362c790b27ff0d88714d71d49
2017-05-02 09:12:56 -07:00
Durham Goode
9e07f19a8b cdatapack: move libdatapack to be statically linked
Summary:
Linking native python extensions together is a huge pain and I'm encountering
bugs in the linker in centos6. To simplify everything, I'm going to merge all
the cstore related libraries into a single library.

Step one is to move the C libdatapack code to be a statically linked library.
distutils doesn't actually support using -l or extra args in it's static library
generator, so we need to monkey patch a fix for that here.

Test Plan:
Built using 'python setup.py build --component cdatapack'.  Verified the static library was built:
```
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -Iclib -I/usr/local/include -I/opt/local/include -I/opt/homebrew/include/ -c cdatapack/cdatapack.c -o build/temp.linux-x86_64-2.7/cdatapack/cdatapack.o -std=c99 -Wall -Werror -Werror=strict-prototypes
ar rc build/temp.linux-x86_64-2.7/libdatapack.a build/temp.linux-x86_64-2.7/cdatapack/cdatapack.o
```

And the resulting cdatapack.o library did not reference a libdatapack shared library any more by running 'ldd cdatapack.so'.  On OSX verified the same thing using "otool -L cdatapack.so"

Reviewers: #mercurial, simonfar

Reviewed By: simonfar

Subscribers: simonfar, stash, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4581274

Signature: t1:4581274:1487842180:d2125ebec7bbb9533e02b0589f188251881ed569
2017-02-23 14:03:02 -08:00
Ryan McElroy
59ab0f3dbb merge Makefile contents
Test Plan: make local

Reviewers: #mercurial, ttung, simonfar

Reviewed By: simonfar

Subscribers: simonfar, mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D3777379

Tasks: 12855049

Signature: t1:3777379:1472217558:ec79a66e76854d1d80f6b17c82be6d597e7884cc
2016-08-26 06:27:59 -07:00
Durham Goode
26387ef0c1 Initial commit: fbamend, smartlog 2013-06-20 12:16:36 -07:00