-
Notifications
You must be signed in to change notification settings - Fork 683
Isolate GCC specific code #1505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tilmannOSG
merged 1 commit into
jerryscript-project:master
from
t-harvey:isolate_gcc_specific_code
Jan 24, 2017
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Copyright JS Foundation and other contributors, http://js.foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
include(CMakeForceCompiler) | ||
|
||
set(CMAKE_SYSTEM_NAME MCU) | ||
set(CMAKE_SYSTEM_PROCESSOR armv7l) | ||
set(CMAKE_SYSTEM_VERSION TIM4F) | ||
|
||
set(FLAGS_COMMON_ARCH --little_endian --silicon_version=7M4 --float_support=FPv4SPD16) | ||
|
||
CMAKE_FORCE_C_COMPILER(armcl TI) | ||
|
||
SET (CMAKE_C_FLAGS_DEBUG_INIT "-g") | ||
SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-o4 -mf0 -DNDEBUG") | ||
SET (CMAKE_C_FLAGS_RELEASE_INIT "-o4 -DNDEBUG") | ||
SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-o2 -g") | ||
|
||
SET (CMAKE_CXX_FLAGS_DEBUG_INIT "-g") | ||
SET (CMAKE_CXX_FLAGS_MINSIZEREL_INIT "-o4 -mf0 -DNDEBUG") | ||
SET (CMAKE_CXX_FLAGS_RELEASE_INIT "-o4 -DNDEBUG") | ||
SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-o2 -g") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,5 @@ | |
#include <stdbool.h> | ||
#include <stddef.h> | ||
#include <stdint.h> | ||
#include <sys/types.h> | ||
|
||
#endif /* !JRT_TYPES_H */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you add this flag somewhere else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't; -- I wasn't confident in this change. :-)
I understand that -g was put in as a default variable b/c of an earlier bug in the code (maybe in jerry-main?...my memory doesn't get better as I age :-) -- and I know that interim fixes have made setting -g as the default unnecessary.
I like the flow that has the user set the cmake variables CMAKE__<DEBUG|RELEASE> to include/exclude settings -- this, I think, matches user expectations...
...but, as with all of these, I'll gladly make an argument and start a discussion, but I've got no ego in this: if I'm wrong here, I'll happily fix it (if we put -g back as an always-set flag, does it go back here, or, if not, where?)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems legit, it's not necessary to compiling a release build with debug flags.