Skip to content

Commit 5d4d360

Browse files
committed
Aftermath of PRs #1505 and #1755
PR #1505 added support for TI compiler. It explicitly added a message to notify the user that static linking is forced. PR #1755 added a more generic approach to signal such forced settings and adapted the TI-specific static linking notification to this approach. However, it turned out that TI forcibly changed another setting, too: it disabled release binary stripping, but without notification. This patch fixes this by moving the setting override to a consistent place and adding a notification. PR #1505 also added some source code changes, most importantly a complex struct initialization for a variable in `ecma-objects-general.c`. However, that initialization was coded as a macro to trick the style checker. This patch gets rid of that macro and uses proper C99 struct initializer with designators. JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
1 parent 849ea45 commit 5d4d360

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ endif()
7171

7272
if(USING_TI)
7373
set(ENABLE_STATIC_LINK "ON")
74+
set(ENABLE_STRIP "OFF")
7475

7576
set(ENABLE_STATIC_LINK_MESSAGE " (FORCED BY COMPILER)")
77+
set(ENABLE_STRIP_MESSAGE " (FORCED BY COMPILER)")
7678
endif()
7779

7880
# Status messages
@@ -205,9 +207,7 @@ endif()
205207

206208
# Strip binary
207209
if(ENABLE_STRIP AND NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
208-
if (USING_GCC OR USING_CLANG)
209-
jerry_add_link_flags(-s)
210-
endif()
210+
jerry_add_link_flags(-s)
211211
endif()
212212

213213
# External compiler & linker flags

jerry-core/ecma/operations/ecma-objects-general.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,7 @@ ecma_op_general_object_define_own_property (ecma_object_t *object_p, /**< the ob
313313
JERRY_ASSERT (property_desc_p->is_writable_defined || !property_desc_p->is_writable);
314314

315315
/* 1. */
316-
/* This #def just gets around the syntax/style checker... */
317-
#define extended_property_ref_initialization { { 0 } , 0 }
318-
ecma_extended_property_ref_t ext_property_ref = extended_property_ref_initialization;
316+
ecma_extended_property_ref_t ext_property_ref = { .property_ref.value_p = NULL, .property_p = NULL };
319317
ecma_property_t current_prop;
320318

321319
current_prop = ecma_op_object_get_own_property (object_p,

0 commit comments

Comments
 (0)