Revert "Move base library definitions from v8.gyp to base.gyp."
authorbmeurer@chromium.org <bmeurer@chromium.org>
Fri, 29 Aug 2014 12:30:50 +0000 (12:30 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org>
Fri, 29 Aug 2014 12:30:50 +0000 (12:30 +0000)
This reverts commit r23518 for breaking Blink bots.

TBR=vogelheim@chromium.org

Review URL: https://codereview.chromium.org/517303002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23520 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

build/all.gyp
src/base/base.gyp
tools/gyp/v8.gyp

index 8ac10ef..6ac415a 100644 (file)
@@ -9,7 +9,7 @@
       'type': 'none',
       'dependencies': [
         '../samples/samples.gyp:*',
-        '../src/base/base.gyp:base-unittests',
+        '../src/base/base.gyp:*',
         '../src/d8.gyp:d8',
         '../test/cctest/cctest.gyp:*',
         '../test/compiler-unittests/compiler-unittests.gyp:*',
index 33d9b14..6b1b8f2 100644 (file)
   'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
   'targets': [
     {
-      'target_name': 'base',
-      'type': 'static_library',
-      'variables': {
-        'optimize': 'max',
-      },
-      'include_dirs+': [
-        '../..',
-      ],
-      'sources': [
-        'atomicops.h',
-        'atomicops_internals_arm64_gcc.h',
-        'atomicops_internals_arm_gcc.h',
-        'atomicops_internals_atomicword_compat.h',
-        'atomicops_internals_mac.h',
-        'atomicops_internals_mips_gcc.h',
-        'atomicops_internals_tsan.h',
-        'atomicops_internals_x86_gcc.cc',
-        'atomicops_internals_x86_gcc.h',
-        'atomicops_internals_x86_msvc.h',
-        'bits.h',
-        'build_config.h',
-        'cpu.cc',
-        'cpu.h',
-        'flags.h',
-        'lazy-instance.h',
-        'logging.cc',
-        'logging.h',
-        'macros.h',
-        'once.cc',
-        'once.h',
-        'platform/elapsed-timer.h',
-        'platform/time.cc',
-        'platform/time.h',
-        'platform/condition-variable.cc',
-        'platform/condition-variable.h',
-        'platform/mutex.cc',
-        'platform/mutex.h',
-        'platform/platform.h',
-        'platform/semaphore.cc',
-        'platform/semaphore.h',
-        'safe_conversions.h',
-        'safe_conversions_impl.h',
-        'safe_math.h',
-        'safe_math_impl.h',
-        'sys-info.cc',
-        'sys-info.h',
-        'utils/random-number-generator.cc',
-        'utils/random-number-generator.h',
-      ],
-      'conditions': [
-        ['want_separate_host_toolset==1', {
-          'toolsets': ['host', 'target'],
-        }, {
-          'toolsets': ['target'],
-        }],
-        ['OS=="linux"', {
-            'link_settings': {
-              'libraries': [
-                '-lrt'
-              ]
-            },
-            'sources': [
-              'platform/platform-linux.cc',
-              'platform/platform-posix.cc'
-            ],
-          }
-        ],
-        ['OS=="android"', {
-            'sources': [
-              'platform/platform-posix.cc'
-            ],
-            'conditions': [
-              ['host_os=="mac"', {
-                'target_conditions': [
-                  ['_toolset=="host"', {
-                    'sources': [
-                      'platform/platform-macos.cc'
-                    ]
-                  }, {
-                    'sources': [
-                      'platform/platform-linux.cc'
-                    ]
-                  }],
-                ],
-              }, {
-                # TODO(bmeurer): What we really want here, is this:
-                #
-                # 'link_settings': {
-                #   'target_conditions': [
-                #     ['_toolset=="host"', {
-                #       'libraries': [
-                #         '-lrt'
-                #       ]
-                #     }]
-                #   ]
-                # },
-                #
-                # but we can't do this right now, as the AOSP does not support
-                # linking against the host librt, so we need to work around this
-                # for now, using the following hack (see platform/time.cc):
-                'target_conditions': [
-                  ['_toolset=="host"', {
-                    'defines': [
-                      'V8_LIBRT_NOT_AVAILABLE=1',
-                    ],
-                  }],
-                ],
-                'sources': [
-                  'platform/platform-linux.cc'
-                ]
-              }],
-            ],
-          },
-        ],
-        ['OS=="qnx"', {
-            'link_settings': {
-              'target_conditions': [
-                ['_toolset=="host" and host_os=="linux"', {
-                  'libraries': [
-                    '-lrt'
-                  ],
-                }],
-                ['_toolset=="target"', {
-                  'libraries': [
-                    '-lbacktrace'
-                  ],
-                }],
-              ],
-            },
-            'sources': [
-              'platform/platform-posix.cc',
-              'qnx-math.h',
-            ],
-            'target_conditions': [
-              ['_toolset=="host" and host_os=="linux"', {
-                'sources': [
-                  'platform/platform-linux.cc'
-                ],
-              }],
-              ['_toolset=="host" and host_os=="mac"', {
-                'sources': [
-                  'platform/platform-macos.cc'
-                ],
-              }],
-              ['_toolset=="target"', {
-                'sources': [
-                  'platform/platform-qnx.cc'
-                ],
-              }],
-            ],
-          },
-        ],
-        ['OS=="freebsd"', {
-            'link_settings': {
-              'libraries': [
-                '-L/usr/local/lib -lexecinfo',
-            ]},
-            'sources': [
-              'platform/platform-freebsd.cc',
-              'platform/platform-posix.cc'
-            ],
-          }
-        ],
-        ['OS=="openbsd"', {
-            'link_settings': {
-              'libraries': [
-                '-L/usr/local/lib -lexecinfo',
-            ]},
-            'sources': [
-              'platform/platform-openbsd.cc',
-              'platform/platform-posix.cc'
-            ],
-          }
-        ],
-        ['OS=="netbsd"', {
-            'link_settings': {
-              'libraries': [
-                '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo',
-            ]},
-            'sources': [
-              'platform/platform-openbsd.cc',
-              'platform/platform-posix.cc'
-            ],
-          }
-        ],
-        ['OS=="solaris"', {
-            'link_settings': {
-              'libraries': [
-                '-lnsl',
-            ]},
-            'sources': [
-              'platform/platform-solaris.cc',
-              'platform/platform-posix.cc'
-            ],
-          }
-        ],
-        ['OS=="mac"', {
-          'sources': [
-            'platform/platform-macos.cc',
-            'platform/platform-posix.cc'
-          ]},
-        ],
-        ['OS=="win"', {
-          'defines': [
-            '_CRT_RAND_S'  # for rand_s()
-          ],
-          'variables': {
-            'gyp_generators': '<!(echo $GYP_GENERATORS)',
-          },
-          'conditions': [
-            ['gyp_generators=="make"', {
-              'variables': {
-                'build_env': '<!(uname -o)',
-              },
-              'conditions': [
-                ['build_env=="Cygwin"', {
-                  'sources': [
-                    'platform/platform-cygwin.cc',
-                    'platform/platform-posix.cc'
-                  ],
-                }, {
-                  'sources': [
-                    'platform/platform-win32.cc',
-                    'win32-headers.h',
-                    'win32-math.cc',
-                    'win32-math.h'
-                  ],
-                }],
-              ],
-              'link_settings':  {
-                'libraries': [ '-lwinmm', '-lws2_32' ],
-              },
-            }, {
-              'sources': [
-                'platform/platform-win32.cc',
-                'win32-headers.h',
-                'win32-math.cc',
-                'win32-math.h'
-              ],
-              'msvs_disabled_warnings': [4351, 4355, 4800],
-              'link_settings':  {
-                'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ],
-              },
-            }],
-          ],
-        }],
-      ],
-    },
-    {
       'target_name': 'base-unittests',
       'type': 'executable',
       'dependencies': [
         '../../testing/gtest.gyp:gtest',
         '../../testing/gtest.gyp:gtest_main',
-        'base',
+        '../../tools/gyp/v8.gyp:v8_libbase',
       ],
       'include_dirs': [
         '../..',
index c34da0b..d6b59de 100644 (file)
       'target_name': 'v8_base',
       'type': 'static_library',
       'dependencies': [
-        '../../src/base/base.gyp:base',
+        'v8_libbase',
       ],
       'variables': {
         'optimize': 'max',
       ],
     },
     {
+      'target_name': 'v8_libbase',
+      'type': 'static_library',
+      'variables': {
+        'optimize': 'max',
+      },
+      'include_dirs+': [
+        '../..',
+      ],
+      'sources': [
+        '../../src/base/atomicops.h',
+        '../../src/base/atomicops_internals_arm64_gcc.h',
+        '../../src/base/atomicops_internals_arm_gcc.h',
+        '../../src/base/atomicops_internals_atomicword_compat.h',
+        '../../src/base/atomicops_internals_mac.h',
+        '../../src/base/atomicops_internals_mips_gcc.h',
+        '../../src/base/atomicops_internals_tsan.h',
+        '../../src/base/atomicops_internals_x86_gcc.cc',
+        '../../src/base/atomicops_internals_x86_gcc.h',
+        '../../src/base/atomicops_internals_x86_msvc.h',
+        '../../src/base/bits.h',
+        '../../src/base/build_config.h',
+        '../../src/base/cpu.cc',
+        '../../src/base/cpu.h',
+        '../../src/base/flags.h',
+        '../../src/base/lazy-instance.h',
+        '../../src/base/logging.cc',
+        '../../src/base/logging.h',
+        '../../src/base/macros.h',
+        '../../src/base/once.cc',
+        '../../src/base/once.h',
+        '../../src/base/platform/elapsed-timer.h',
+        '../../src/base/platform/time.cc',
+        '../../src/base/platform/time.h',
+        '../../src/base/platform/condition-variable.cc',
+        '../../src/base/platform/condition-variable.h',
+        '../../src/base/platform/mutex.cc',
+        '../../src/base/platform/mutex.h',
+        '../../src/base/platform/platform.h',
+        '../../src/base/platform/semaphore.cc',
+        '../../src/base/platform/semaphore.h',
+        '../../src/base/safe_conversions.h',
+        '../../src/base/safe_conversions_impl.h',
+        '../../src/base/safe_math.h',
+        '../../src/base/safe_math_impl.h',
+        '../../src/base/sys-info.cc',
+        '../../src/base/sys-info.h',
+        '../../src/base/utils/random-number-generator.cc',
+        '../../src/base/utils/random-number-generator.h',
+      ],
+      'conditions': [
+        ['want_separate_host_toolset==1', {
+          'toolsets': ['host', 'target'],
+        }, {
+          'toolsets': ['target'],
+        }],
+        ['OS=="linux"', {
+            'link_settings': {
+              'libraries': [
+                '-lrt'
+              ]
+            },
+            'sources': [
+              '../../src/base/platform/platform-linux.cc',
+              '../../src/base/platform/platform-posix.cc'
+            ],
+          }
+        ],
+        ['OS=="android"', {
+            'sources': [
+              '../../src/base/platform/platform-posix.cc'
+            ],
+            'conditions': [
+              ['host_os=="mac"', {
+                'target_conditions': [
+                  ['_toolset=="host"', {
+                    'sources': [
+                      '../../src/base/platform/platform-macos.cc'
+                    ]
+                  }, {
+                    'sources': [
+                      '../../src/base/platform/platform-linux.cc'
+                    ]
+                  }],
+                ],
+              }, {
+                # TODO(bmeurer): What we really want here, is this:
+                #
+                # 'link_settings': {
+                #   'target_conditions': [
+                #     ['_toolset=="host"', {
+                #       'libraries': [
+                #         '-lrt'
+                #       ]
+                #     }]
+                #   ]
+                # },
+                #
+                # but we can't do this right now, as the AOSP does not support
+                # linking against the host librt, so we need to work around this
+                # for now, using the following hack (see platform/time.cc):
+                'target_conditions': [
+                  ['_toolset=="host"', {
+                    'defines': [
+                      'V8_LIBRT_NOT_AVAILABLE=1',
+                    ],
+                  }],
+                ],
+                'sources': [
+                  '../../src/base/platform/platform-linux.cc'
+                ]
+              }],
+            ],
+          },
+        ],
+        ['OS=="qnx"', {
+            'link_settings': {
+              'target_conditions': [
+                ['_toolset=="host" and host_os=="linux"', {
+                  'libraries': [
+                    '-lrt'
+                  ],
+                }],
+                ['_toolset=="target"', {
+                  'libraries': [
+                    '-lbacktrace'
+                  ],
+                }],
+              ],
+            },
+            'sources': [
+              '../../src/base/platform/platform-posix.cc',
+              '../../src/base/qnx-math.h',
+            ],
+            'target_conditions': [
+              ['_toolset=="host" and host_os=="linux"', {
+                'sources': [
+                  '../../src/base/platform/platform-linux.cc'
+                ],
+              }],
+              ['_toolset=="host" and host_os=="mac"', {
+                'sources': [
+                  '../../src/base/platform/platform-macos.cc'
+                ],
+              }],
+              ['_toolset=="target"', {
+                'sources': [
+                  '../../src/base/platform/platform-qnx.cc'
+                ],
+              }],
+            ],
+          },
+        ],
+        ['OS=="freebsd"', {
+            'link_settings': {
+              'libraries': [
+                '-L/usr/local/lib -lexecinfo',
+            ]},
+            'sources': [
+              '../../src/base/platform/platform-freebsd.cc',
+              '../../src/base/platform/platform-posix.cc'
+            ],
+          }
+        ],
+        ['OS=="openbsd"', {
+            'link_settings': {
+              'libraries': [
+                '-L/usr/local/lib -lexecinfo',
+            ]},
+            'sources': [
+              '../../src/base/platform/platform-openbsd.cc',
+              '../../src/base/platform/platform-posix.cc'
+            ],
+          }
+        ],
+        ['OS=="netbsd"', {
+            'link_settings': {
+              'libraries': [
+                '-L/usr/pkg/lib -Wl,-R/usr/pkg/lib -lexecinfo',
+            ]},
+            'sources': [
+              '../../src/base/platform/platform-openbsd.cc',
+              '../../src/base/platform/platform-posix.cc'
+            ],
+          }
+        ],
+        ['OS=="solaris"', {
+            'link_settings': {
+              'libraries': [
+                '-lnsl',
+            ]},
+            'sources': [
+              '../../src/base/platform/platform-solaris.cc',
+              '../../src/base/platform/platform-posix.cc'
+            ],
+          }
+        ],
+        ['OS=="mac"', {
+          'sources': [
+            '../../src/base/platform/platform-macos.cc',
+            '../../src/base/platform/platform-posix.cc'
+          ]},
+        ],
+        ['OS=="win"', {
+          'defines': [
+            '_CRT_RAND_S'  # for rand_s()
+          ],
+          'variables': {
+            'gyp_generators': '<!(echo $GYP_GENERATORS)',
+          },
+          'conditions': [
+            ['gyp_generators=="make"', {
+              'variables': {
+                'build_env': '<!(uname -o)',
+              },
+              'conditions': [
+                ['build_env=="Cygwin"', {
+                  'sources': [
+                    '../../src/base/platform/platform-cygwin.cc',
+                    '../../src/base/platform/platform-posix.cc'
+                  ],
+                }, {
+                  'sources': [
+                    '../../src/base/platform/platform-win32.cc',
+                    '../../src/base/win32-headers.h',
+                    '../../src/base/win32-math.cc',
+                    '../../src/base/win32-math.h'
+                  ],
+                }],
+              ],
+              'link_settings':  {
+                'libraries': [ '-lwinmm', '-lws2_32' ],
+              },
+            }, {
+              'sources': [
+                '../../src/base/platform/platform-win32.cc',
+                '../../src/base/win32-headers.h',
+                '../../src/base/win32-math.cc',
+                '../../src/base/win32-math.h'
+              ],
+              'msvs_disabled_warnings': [4351, 4355, 4800],
+              'link_settings':  {
+                'libraries': [ '-lwinmm.lib', '-lws2_32.lib' ],
+              },
+            }],
+          ],
+        }],
+      ],
+    },
+    {
       'target_name': 'v8_libplatform',
       'type': 'static_library',
       'variables': {
         'optimize': 'max',
       },
       'dependencies': [
-        '../../src/base/base.gyp:base',
+        'v8_libbase',
       ],
       'include_dirs+': [
         '../..',