Skip to content

Commit 2c113fb

Browse files
committed
Remove more debug flags from native library builds
1 parent e5adf6e commit 2c113fb

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

graalpython/com.oracle.graal.python.hpy.llvm/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,6 @@ target_include_directories(${TARGET_LIB} PRIVATE
9797
"${TRUFFLE_H_INC}"
9898
)
9999

100-
add_compile_options(-ffile-prefix-map=${GRAALPY_PARENT_DIR}=.)
101-
102100
target_compile_definitions(${TARGET_LIB} PRIVATE
103101
HPY_ABI_HYBRID
104102
NDEBUG
@@ -119,14 +117,15 @@ if(WIN32)
119117
endif()
120118

121119
if(MSVC)
122-
target_compile_options(${TARGET_LIB} PRIVATE /Z7 /O2 /WX)
120+
target_compile_options(${TARGET_LIB} PRIVATE /O2 /WX)
123121
else()
124122
if(NOT WIN32)
125123
target_compile_options(${TARGET_LIB} PRIVATE
126124
-Werror
127125
)
128126
endif()
129127
target_compile_options(${TARGET_LIB} PRIVATE
128+
-ffile-prefix-map=${GRAALPY_PARENT_DIR}=.
130129
-Wno-int-to-pointer-cast
131130
-Wno-int-conversion
132131
-Wno-void-pointer-to-int-cast

graalpython/python-libbz2/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -44,9 +44,9 @@ add_library(${TARGET_BZIP2SUPPORT} SHARED)
4444
target_compile_definitions(${TARGET_BZIP2SUPPORT} PRIVATE NDEBUG)
4545

4646
if(WIN32)
47-
target_compile_options(${TARGET_BZIP2SUPPORT} PRIVATE /Z7 /O2 /WX)
47+
target_compile_options(${TARGET_BZIP2SUPPORT} PRIVATE /O2 /WX)
4848
else()
49-
target_compile_options(${TARGET_BZIP2SUPPORT} PRIVATE -Wall -Werror -O3 -g)
49+
target_compile_options(${TARGET_BZIP2SUPPORT} PRIVATE -Wall -Werror -O3)
5050
endif()
5151

5252
# don't install into the system but into the MX project's output dir

graalpython/python-libbz2/libbz2.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -57,9 +57,9 @@ set_target_properties(${TARGET_LIBBZ2} PROPERTIES POSITION_INDEPENDENT_CODE TRUE
5757
target_compile_definitions(${TARGET_LIBBZ2} PRIVATE _FILE_OFFSET_BITS=64)
5858

5959
if(WIN32)
60-
target_compile_options(${TARGET_LIBBZ2} PRIVATE /Z7 /O2 /Wall)
60+
target_compile_options(${TARGET_LIBBZ2} PRIVATE /O2 /Wall)
6161
else()
62-
target_compile_options(${TARGET_LIBBZ2} PRIVATE -Wall -Winline -O2 -g)
62+
target_compile_options(${TARGET_LIBBZ2} PRIVATE -Wall -Winline -O2)
6363
endif()
6464

6565
# don't install into the system but into the MX project's output dir

graalpython/python-liblzma/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2023, Oracle and/or its affiliates.
2+
# Copyright (c) 2023, 2024, Oracle and/or its affiliates.
33
#
44
# All rights reserved.
55
#
@@ -82,10 +82,10 @@ if(WIN32)
8282
target_compile_options(${TARGET_LZMA} PRIVATE /Z7 /O2)
8383
target_compile_options(${TARGET_LZMASUPPORT} PRIVATE /Z7 /O2 /W3 /WX)
8484
else()
85-
target_compile_options(${TARGET_LZMA} PRIVATE -fPIC -DPIC -g -O2)
85+
target_compile_options(${TARGET_LZMA} PRIVATE -fPIC -DPIC -O2)
8686
target_compile_definitions(${TARGET_LZMA} PRIVATE PIC)
8787

88-
target_compile_options(${TARGET_LZMASUPPORT} PRIVATE -g -O3 -Wall -Werror)
88+
target_compile_options(${TARGET_LZMASUPPORT} PRIVATE -O3 -Wall -Werror)
8989
endif()
9090

9191
# don't install into the system but into the MX project's output dir

mx.graalpython/suite.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,8 @@
821821
"<others>": {
822822
"cflags": [
823823
"-DHPY_ABI_HYBRID", "-DHPY_EMBEDDED_MODULES", "-DNDEBUG", "-DMS_WINDOWS",
824-
# cflags equivalent to -g -O3 -Wall (/W3, could be /Wall) -Werror (/WX)
825-
"-D_CRT_SECURE_NO_WARNINGS", "/Z7", "/O2", "/W3", "/WX",
824+
# cflags equivalent to -O3 -Wall (/W3, could be /Wall) -Werror (/WX)
825+
"-D_CRT_SECURE_NO_WARNINGS", "/O2", "/W3", "/WX",
826826
"-I\"<path:com.oracle.graal.python.cext>/include\"",
827827
"-I\"<path:com.oracle.graal.python.cext>/include/internal\"",
828828
"-I\"<path:com.oracle.graal.python.cext>/src\"",
@@ -857,13 +857,13 @@
857857
"deliverable": "zsupport",
858858
"buildDependencies": [],
859859
"cflags": [
860-
"-DNDEBUG", "-g", "-O3", "-Werror",
860+
"-DNDEBUG", "-O3", "-Werror",
861861
],
862862
"ldlibs": ["-lz"],
863863
"os_arch": {
864864
"windows": {
865865
"<others>": {
866-
# "/Z7", "/O2", "/WX", # cflags to replace -g -O3 -Werror
866+
# "/O2", "/WX", # cflags to replace -O3 -Werror
867867
"defaultBuild": False,
868868
},
869869
},
@@ -881,12 +881,12 @@
881881
"deliverable": "posix",
882882
"buildDependencies": [],
883883
"cflags": [
884-
"-DNDEBUG", "-g", "-O3", "-Wall", "-Werror",
884+
"-DNDEBUG", "-O3", "-Wall", "-Werror",
885885
],
886886
"os_arch": {
887887
"windows": {
888888
"<others>": {
889-
# "/Z7", "/O2", "/WX", # cflags to replace -g -O3 -Werror
889+
# "/O2", "/WX", # cflags to replace -O3 -Werror
890890
"defaultBuild": False,
891891
},
892892
},

0 commit comments

Comments
 (0)