1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
diff -Naur a/setup.py b/setup.py
--- a/setup.py 2020-04-23 08:20:55.742402600 +0300
+++ b/setup.py 2020-09-22 08:29:43.065243208 +0300
@@ -211,13 +211,21 @@
py_modules = []
packages = ["efl"]
common_cflags = [
- "-fno-var-tracking-assignments", # seems to lower the mem used during build
- "-Wno-misleading-indentation", # not needed (we don't indent the C code)
- "-Wno-deprecated-declarations", # we bind deprecated functions
- "-Wno-unused-variable", # eo_instance_from_object() is unused
- "-Wno-format-security", # some cc don't like the way cython use EINA_LOG macros
- # "-Werror", "-Wfatal-errors" # use this to stop build on first warnings
+ "-fno-var-tracking-assignments", # seems to lower the mem used during build
+ "-Wno-misleading-indentation", # not needed (we don't indent the C code)
+ "-Wno-deprecated-declarations", # we bind deprecated functions
+ "-Wno-unused-variable", # eo_instance_from_object() is unused
+ "-Wno-format-security", # some cc don't like the way cython use EINA_LOG macros
+ # "-Werror", "-Wfatal-errors" # use this to stop build on first warnings
]
+# remove clang unknown flags
+if os.getenv("CC") == "clang":
+ common_cflags.remove('-fno-var-tracking-assignments')
+if os.getenv("CC") == "x86_64-pc-linux-gnu-clang":
+ common_cflags.remove('-fno-var-tracking-assignments')
+if os.getenv("CC") == "i686-pc-linux-gnu-clang":
+ common_cflags.remove('-fno-var-tracking-assignments')
+
if set(("build", "build_ext", "install", "bdist", "sdist")) & set(sys.argv):
sys.stdout.write("Python-EFL: %s\n" % RELEASE)
|