leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 | [diff] [blame] | 1 | # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 2 | # |
| 3 | # Use of this source code is governed by a BSD-style license |
| 4 | # that can be found in the LICENSE file in the root of the source |
| 5 | # tree. An additional intellectual property rights grant can be found |
| 6 | # in the file PATENTS. All contributing project authors may |
| 7 | # be found in the AUTHORS file in the root of the source tree. |
| 8 | |
| 9 | # This file sets correct neon flags. Include it if you want to build |
| 10 | # source with neon intrinsics. |
| 11 | # To use this, create a gyp target with the following form: |
| 12 | # { |
| 13 | # 'target_name': 'my_lib', |
| 14 | # 'type': 'static_library', |
| 15 | # 'sources': [ |
| 16 | # 'foo.c', |
| 17 | # 'bar.cc', |
| 18 | # ], |
| 19 | # 'includes': ['path/to/this/gypi/file'], |
| 20 | # } |
| 21 | |
| 22 | { |
kma@webrtc.org | df42df5 | 2012-10-11 17:59:17 | [diff] [blame] | 23 | 'cflags!': [ |
| 24 | '-mfpu=vfpv3-d16', |
| 25 | ], |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 | [diff] [blame] | 26 | 'conditions': [ |
Andrew MacDonald | ac4234c | 2015-06-25 01:25:54 | [diff] [blame] | 27 | # "-mfpu=neon" is not required for arm64 in GCC. |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 | [diff] [blame] | 28 | ['target_arch!="arm64"', { |
| 29 | 'cflags': [ |
| 30 | '-mfpu=neon', |
| 31 | ], |
| 32 | }], |
Peter Collingbourne | 7b3de4b | 2015-08-18 04:06:23 | [diff] [blame] | 33 | # Disable GCC LTO on NEON targets due to compiler bug. |
Andrew MacDonald | ac4234c | 2015-06-25 01:25:54 | [diff] [blame] | 34 | # TODO(fdegans): Enable this. See crbug.com/408997. |
Peter Collingbourne | 7b3de4b | 2015-08-18 04:06:23 | [diff] [blame] | 35 | ['clang==0 and use_lto==1', { |
Andrew MacDonald | ac4234c | 2015-06-25 01:25:54 | [diff] [blame] | 36 | 'cflags!': [ |
| 37 | '-flto', |
| 38 | '-ffat-lto-objects', |
| 39 | ], |
| 40 | }], |
andrew@webrtc.org | a56a2c5 | 2014-11-26 17:01:40 | [diff] [blame] | 41 | ], |
leozwang@webrtc.org | f5fe100 | 2012-05-08 15:20:02 | [diff] [blame] | 42 | } |