]> khamidou — GitHub mirrors - electron.git/commitdiff
linux: Fix linking with node and v8
authorCheng Zhao <zcbenz@gmail.com>
Fri, 10 Apr 2015 04:07:53 +0000 (12:07 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Fri, 10 Apr 2015 04:22:18 +0000 (12:22 +0800)
atom.gyp
common.gypi
script/dump-symbols.py
script/lib/config.py
vendor/brightray
vendor/node

index 649e7079a986cfe149675d130ca15b1be841edf8..e4efefd6260eacc096cb0c0d53c684ff7d020f66 100644 (file)
--- a/atom.gyp
+++ b/atom.gyp
                 'conditions': [
                   ['libchromiumcontent_component', {
                     'copied_libraries': [
-                      '<(PRODUCT_DIR)/node.dll'
                       '<@(libchromiumcontent_shared_libraries)',
                       '<@(libchromiumcontent_shared_v8_libraries)',
                     ],
                   }, {
                     'copied_libraries': [
-                      '<(PRODUCT_DIR)/node.dll'
-                      '<(libchromiumcontent_dir)/boringssl.dll'
+                      '<(libchromiumcontent_dir)/boringssl.dll',
                     ],
                   }],
                 ],
                 'conditions': [
                   ['libchromiumcontent_component', {
                     'copied_libraries': [
-                      '<(PRODUCT_DIR)/libnode.so'
+                      '<(PRODUCT_DIR)/lib/libnode.so',
                       '<@(libchromiumcontent_shared_libraries)',
                       '<@(libchromiumcontent_shared_v8_libraries)',
                     ],
                   }, {
                     'copied_libraries': [
-                      '<(PRODUCT_DIR)/libnode.so'
-                      '<(libchromiumcontent_dir)/libboringssl.so'
+                      '<(PRODUCT_DIR)/lib/libnode.so',
+                      '<(libchromiumcontent_dir)/libboringssl.so',
                     ],
                   }],
                 ],
index 087cd335d1c6b190022d05c146efe0eed2f9228c..e33555b2140a8d2b0aed92c480d6d27fcce9440e 100644 (file)
               '-Wno-unused-value',
               '-Wno-deprecated-declarations',
               '-Wno-return-type',
+              # Required when building as shared library.
+              '-fPIC',
             ],
           }],
         ],
       }],
       ['_target_name=="node"', {
         'include_dirs': [ '<(libchromiumcontent_src_dir)/v8/include' ],
-        'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
+        'conditions': [
+          ['OS=="linux" and libchromiumcontent_component==0', {
+            # Prevent the linker to strip symbols.
+            'ldflags': [
+              '-Wl,--whole-archive',
+              '<@(libchromiumcontent_v8_libraries)',
+              '-Wl,--no-whole-archive',
+            ],
+          }, {
+            'libraries': [ '<@(libchromiumcontent_v8_libraries)' ],
+          }],
+        ],
       }],
       ['_target_name=="libuv"', {
         'conditions': [
index 9ac6782943b72aaf2f8c7475c26f1be0b6fdbd05..10471517b6982831cd60f24f88ffa85e5eca6428 100755 (executable)
@@ -15,7 +15,8 @@ CHROMIUM_DIR = os.path.join(SOURCE_ROOT, 'vendor', 'brightray', 'vendor',
 
 
 def main(destination):
-  register_required_dll()
+  if TARGET_PLATFORM == 'win32':
+    register_required_dll()
 
   rm_rf(destination)
   (project_name, product_name) = get_names_from_gyp()
index f14037a37959f9bc61f6a21922ab4ca4f43cce4a..9663480154eb3e8b608b042e3f2bfe1eb4088cc2 100644 (file)
@@ -4,7 +4,7 @@ import platform
 import sys
 
 BASE_URL = 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent'
-LIBCHROMIUMCONTENT_COMMIT = '60350899df1f7058c9026a239820d0519edb19cc'
+LIBCHROMIUMCONTENT_COMMIT = '0718fa8b44e004a39ee2511858abbef1dae89cef'
 
 ARCH = {
     'cygwin': '32bit',
index 1b62aab98e1e79f6357bd156fc2a43068d4a3f49..0f37e5fa4d5273f80c91d485e0ce6edef683a26e 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 1b62aab98e1e79f6357bd156fc2a43068d4a3f49
+Subproject commit 0f37e5fa4d5273f80c91d485e0ce6edef683a26e
index bf5162b9042ff3e626a1adbd56b547801fda8cbf..561969a65ff36c2df94326664813f46b7c5803b1 160000 (submodule)
@@ -1 +1 @@
-Subproject commit bf5162b9042ff3e626a1adbd56b547801fda8cbf
+Subproject commit 561969a65ff36c2df94326664813f46b7c5803b1