aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/__init__.py
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2018-06-05 21:40:32 -0400
committerKevin O'Connor <kevin@koconnor.net>2018-06-20 09:26:10 -0400
commit8a830ff0cee1ae96044cee4258842a14b2781a94 (patch)
tree3fbd55936c978dc6a98e759b8888a0241846ce2a /klippy/chelper/__init__.py
parent189ebb4c7d5134296ce9e2bebe304a795b38ef89 (diff)
downloadkutter-8a830ff0cee1ae96044cee4258842a14b2781a94.tar.gz
kutter-8a830ff0cee1ae96044cee4258842a14b2781a94.tar.xz
kutter-8a830ff0cee1ae96044cee4258842a14b2781a94.zip
chelper: Compile with gcc -fwhole-program option
Use the -fwhole-program option when compiling the host C code. This makes it easier to support inlining across C files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'klippy/chelper/__init__.py')
-rw-r--r--klippy/chelper/__init__.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/klippy/chelper/__init__.py b/klippy/chelper/__init__.py
index f7ba372c..ed5e156c 100644
--- a/klippy/chelper/__init__.py
+++ b/klippy/chelper/__init__.py
@@ -11,7 +11,9 @@ import cffi
# c_helper.so compiling
######################################################################
-COMPILE_CMD = "gcc -Wall -g -O2 -shared -fPIC -o %s %s"
+COMPILE_CMD = ("gcc -Wall -g -O2 -shared -fPIC"
+ " -flto -fwhole-program -fno-use-linker-plugin"
+ " -o %s %s")
SOURCE_FILES = ['stepcompress.c', 'serialqueue.c', 'pyhelper.c']
DEST_LIB = "c_helper.so"
OTHER_FILES = ['list.h', 'serialqueue.h', 'pyhelper.h']
@@ -56,9 +58,6 @@ defs_serialqueue = """
void serialqueue_free_commandqueue(struct command_queue *cq);
void serialqueue_send(struct serialqueue *sq, struct command_queue *cq
, uint8_t *msg, int len, uint64_t min_clock, uint64_t req_clock);
- void serialqueue_encode_and_send(struct serialqueue *sq
- , struct command_queue *cq, uint32_t *data, int len
- , uint64_t min_clock, uint64_t req_clock);
void serialqueue_pull(struct serialqueue *sq
, struct pull_queue_message *pqm);
void serialqueue_set_baud_adjust(struct serialqueue *sq, double baud_adjust);