View Issue Details

IDProjectCategoryView StatusLast Update
0026247Open CASCADEOCCT:Configurationpublic2020-06-17 14:27
Reporteroan Assigned Tobugmaster  
PrioritynormalSeveritytrivial 
Status closedResolutionfixed 
Target Version7.0.0Fixed in Version7.0.0 
Summary0026247: Configuration, CMake - strip symbols within Release configuration when using non-msvc
DescriptionBy default binaries with unstripped symbols are produced using MinGW in release mode (-DBUILD_CONFIGURATION:STRING=Release, shared). As a result size of binaries is 3 times greater than expected (e.g. TKernel occupies 6Mb instead of 1.8Mb).

Adding "-s" parameter to CMAKE_CXX_FLAGS_RELEASE can solve this problem.
Steps To ReproduceN/A
TagsNo tags attached.
Test case number

Relationships

parent of 0026911 closedbugmaster Configuration, CMake - strips symbol information from the binary in release configuration if the compiler is a variant of gcc 
parent of 0031614 closedbugmaster Configuration, CMake - eliminate CLang -Wl,-s deprecated warning 

Activities

git

2015-06-19 16:30

administrator   ~0042278

Branch CR26247 has been created by ski.

SHA-1: ff9c3e04f9dc56acb5fdebc931fa57b88136db9b


Detailed log of new commits:

Author: ski
Date: Fri Jun 19 16:09:25 2015 +0300

    0026247: Too huge binaries are produced for Android platform using MinGW
    
    Parameter "-s" was added to CMAKE_CXX_FLAGS_RELEASE for MinGW compiler to optimize size of binaries

ski

2015-06-19 16:34

developer   ~0042279

Parameter "-s" was added to CMAKE_CXX_FLAGS_RELEASE for MinGW compiler to optimize size of binaries in release mode

Size of binaries:
• without fix - 189 Mb
• with fix - 42 Mb

Dear ibs,
please review.

kgv

2015-06-20 02:58

developer   ~0042283

+# Optimize size of binaries for MinGW compiler
+if ("${CMAKE_GENERATOR}" STREQUAL "MinGW Makefiles")
+  set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
+endif()

does this problem is MinGW-specific?

git

2015-06-23 18:27

administrator   ~0042384

Branch CR26247 has been updated forcibly by ski.

SHA-1: 08033f2172b0bce758f9df493787223c684b3598

ski

2015-06-23 18:35

developer   ~0042386

occt branch CR26247 was updated.

I have tried to compile occt on linux station with "-s" parameter and got next results:

Size of binaries:
• without fix - 77 Mb
• with fix - 64 Mb

Dear kgv,
please review.

kgv

2015-06-23 19:14

developer   ~0042391

Please test the patch and integrate.

bugmaster

2015-07-03 17:24

administrator   ~0042721

Insertion of -s option cause crash compilation on MacOS platform

git

2015-07-10 13:53

administrator   ~0042903

Branch CR26247 has been updated forcibly by ski.

SHA-1: 7fa21e9a93d864571b21e03b11569cfef5e5e451

ski

2015-07-10 18:47

developer   ~0042938

Branch CR26247 was rebased on current state of master.

Since now, option "-s" will not be added during compilation on Windows and Mac stations.

Please, review.

kgv

2015-11-09 10:22

developer   ~0047938

+# Optimize size of binaries
+if (NOT WIN32 AND NOT APPLE)
+  set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
+endif()

the same parameter should be added to C compiler options within Release configuration.

git

2015-11-09 18:22

administrator   ~0047962

Branch CR26247 has been updated forcibly by ibs.

SHA-1: c5c58fd312f5b0bd61c089549e0026d395325511

ibs

2015-11-10 14:24

developer   ~0047995

CMAKE_C_FLAGS_RELEASE is also considered. Please review CR26247 branch of OCCT git

git

2015-11-10 14:33

administrator   ~0047998

Branch CR26247 has been updated forcibly by ibs.

SHA-1: c9942f0219a761be468f4221dd306e0423688b04

git

2015-11-13 12:49

administrator   ~0048148

Branch CR26247 has been updated forcibly by ibs.

SHA-1: bbe1e471458f1a0757184844548bd2846138ad15

ibs

2015-11-13 12:49

developer   ~0048149

dear ski,
please review CR26247 branch of OCCT git

ski

2015-11-16 17:36

developer   ~0048243

Reviewed. no remarks, please test.

bugmaster

2015-11-18 12:12

administrator   ~0048339

Last edited: 2015-11-19 14:37

Size of libraries decreased from 114 Mb till 96 Mb

git

2016-04-17 14:19

administrator   ~0053120

Branch CR26247 has been deleted by kgv.

SHA-1: bbe1e471458f1a0757184844548bd2846138ad15

Related Changesets

occt: master 41ec04db

2015-07-10 07:52:53

ski


Committer: bugmaster Details Diff
0026247: Too huge binaries are produced for Android platform using MinGW

Parameter "-s" was added to CMAKE_CXX_FLAGS_RELEASE and CMAKE_C_FLAGS_RELEASE to optimize size of binaries
Affected Issues
0026247
mod - adm/cmake/occt_defs_flags.cmake Diff File

Issue History

Date Modified Username Field Change
2015-05-20 18:08 oan New Issue
2015-05-20 18:08 oan Assigned To => ibs
2015-05-20 18:14 oan Status new => assigned
2015-05-21 13:59 ibs Assigned To ibs => ski
2015-06-19 16:30 git Note Added: 0042278
2015-06-19 16:34 ski Note Added: 0042279
2015-06-19 16:34 ski Assigned To ski => ibs
2015-06-19 16:34 ski Status assigned => resolved
2015-06-19 16:34 ski Steps to Reproduce Updated
2015-06-19 17:02 ibs Assigned To ibs => bugmaster
2015-06-19 17:02 ibs Status resolved => reviewed
2015-06-20 02:58 kgv Note Added: 0042283
2015-06-20 03:01 kgv Assigned To bugmaster => ski
2015-06-20 03:01 kgv Status reviewed => feedback
2015-06-23 18:27 git Note Added: 0042384
2015-06-23 18:28 ski Status feedback => assigned
2015-06-23 18:35 ski Note Added: 0042386
2015-06-23 18:35 ski Assigned To ski => kgv
2015-06-23 18:35 ski Status assigned => resolved
2015-06-23 19:14 kgv Note Added: 0042391
2015-06-23 19:14 kgv Assigned To kgv => bugmaster
2015-06-23 19:14 kgv Status resolved => reviewed
2015-07-03 17:24 bugmaster Note Added: 0042721
2015-07-03 17:24 bugmaster Assigned To bugmaster => ski
2015-07-03 17:24 bugmaster Status reviewed => assigned
2015-07-10 13:53 git Note Added: 0042903
2015-07-10 18:47 ski Note Added: 0042938
2015-07-10 18:47 ski Assigned To ski => kgv
2015-07-10 18:47 ski Status assigned => resolved
2015-11-09 10:22 kgv Note Added: 0047938
2015-11-09 10:22 kgv Assigned To kgv => ibs
2015-11-09 10:22 kgv Status resolved => assigned
2015-11-09 10:22 kgv Summary Too huge binaries are produced for Android platform using MinGW => Configuration, CMake - strip symbols within Release configuration when using non-msvc
2015-11-09 18:22 git Note Added: 0047962
2015-11-10 14:24 ibs Note Added: 0047995
2015-11-10 14:24 ibs Assigned To ibs => kgv
2015-11-10 14:24 ibs Status assigned => resolved
2015-11-10 14:31 kgv Assigned To kgv => ibs
2015-11-10 14:31 kgv Status resolved => assigned
2015-11-10 14:33 git Note Added: 0047998
2015-11-12 14:49 ibs Status assigned => resolved
2015-11-13 12:49 git Note Added: 0048148
2015-11-13 12:49 ibs Note Added: 0048149
2015-11-13 12:49 ibs Assigned To ibs => ski
2015-11-13 12:49 ibs Severity minor => trivial
2015-11-16 17:36 ski Note Added: 0048243
2015-11-16 17:36 ski Assigned To ski => bugmaster
2015-11-16 17:36 ski Status resolved => reviewed
2015-11-18 12:12 bugmaster Note Added: 0048339
2015-11-18 12:12 bugmaster Status reviewed => tested
2015-11-19 14:37 bugmaster Note Edited: 0048339
2015-11-20 12:07 bugmaster Changeset attached => occt master 41ec04db
2015-11-20 12:07 bugmaster Status tested => verified
2015-11-20 12:07 bugmaster Resolution open => fixed
2015-11-21 13:44 ibs Relationship added parent of 0026911
2016-04-17 14:19 git Note Added: 0053120
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed
2020-06-17 14:27 kgv Relationship added parent of 0031614