This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git


The following commit(s) were added to refs/heads/master by this push:
     new 2eb2daa  optimize build profile for datafusion python binding, cli and 
ballista (#1137)
2eb2daa is described below

commit 2eb2daada0bf05ae4321d970ede68ef9b0850204
Author: QP Hou <[email protected]>
AuthorDate: Thu Oct 28 12:50:32 2021 -0700

    optimize build profile for datafusion python binding, cli and ballista 
(#1137)
    
    following our own optimization guideline: 
https://arrow.apache.org/datafusion/user-guide/library.html
---
 .github/workflows/python_build.yml | 1 +
 Cargo.toml                         | 4 ++++
 python/Cargo.toml                  | 4 ++++
 3 files changed, 9 insertions(+)

diff --git a/.github/workflows/python_build.yml 
b/.github/workflows/python_build.yml
index ed30928..6e54d12 100644
--- a/.github/workflows/python_build.yml
+++ b/.github/workflows/python_build.yml
@@ -106,6 +106,7 @@ jobs:
       - run: cat LICENSE.txt
       - name: Build wheels
         run: |
+          export RUSTFLAGS='-C target-cpu=skylake'
           docker run --rm -v $(pwd)/..:/io \
             --workdir /io/python \
             konstin2/maturin:v0.11.2 \
diff --git a/Cargo.toml b/Cargo.toml
index d6da8c1..c722851 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -29,3 +29,7 @@ members = [
 ]
 
 exclude = ["python"]
+
+[profile.release]
+lto = true
+codegen-units = 1
diff --git a/python/Cargo.toml b/python/Cargo.toml
index 5e0ab8d..c0645a1 100644
--- a/python/Cargo.toml
+++ b/python/Cargo.toml
@@ -38,3 +38,7 @@ uuid = { version = "0.8", features = ["v4"] }
 [lib]
 name = "datafusion"
 crate-type = ["cdylib"]
+
+[profile.release]
+lto = true
+codegen-units = 1

Reply via email to