[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-12 Thread Petr Hosek via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL329983: [CMake] Set the default ABI version for Fuchsia in 
CMake as well (authored by phosek, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D45529?vs=142261=142313#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D45529

Files:
  libcxx/trunk/CMakeLists.txt


Index: libcxx/trunk/CMakeLists.txt
===
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -97,7 +97,12 @@
 cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
 "Install libc++experimental.a" ON
 "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
-set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
+if (FUCHSIA)
+  set(DEFAULT_ABI_VERSION 2)
+else()
+  set(DEFAULT_ABI_VERSION 1)
+endif()
+set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of 
libc++.")
 option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the 
Itanium ABI.")
 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the 
Microsoft ABI.")
@@ -619,7 +624,7 @@
 endif()
 
 # Configuration file flags 
=
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)


Index: libcxx/trunk/CMakeLists.txt
===
--- libcxx/trunk/CMakeLists.txt
+++ libcxx/trunk/CMakeLists.txt
@@ -97,7 +97,12 @@
 cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
 "Install libc++experimental.a" ON
 "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
-set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
+if (FUCHSIA)
+  set(DEFAULT_ABI_VERSION 2)
+else()
+  set(DEFAULT_ABI_VERSION 1)
+endif()
+set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of libc++.")
 option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
@@ -619,7 +624,7 @@
 endif()
 
 # Configuration file flags =
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-12 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai accepted this revision.
smeenai added a comment.
This revision is now accepted and ready to land.

Eric accepted on IRC.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment.

In https://reviews.llvm.org/D45529#1066394, @EricWF wrote:

> OK, so we need to bump the SO version -- However I don't want to generate a 
> __site_config header because of that if the __config header is sufficient. I 
> would like to see a solution that takes that into account.


There shouldn't be any `__site_config` generated now since we compare 
`LIBCXX_ABI_VERSION` to the default version so it'll only be generated if the 
change the default value (2 on Fuchsia, 1 everywhere else).


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-12 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF added a comment.

OK, so we need to bump the SO version -- However I don't want to generate a 
__site_config header because of that if the __config header is sufficient. I 
would like to see a solution that takes that into account.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-12 Thread Petr Hosek via Phabricator via cfe-commits
phosek updated this revision to Diff 142261.
phosek marked an inline comment as done.
phosek added a comment.

I had something similar in https://reviews.llvm.org/D45304 but Eric suggested 
removing it. What I haven't realized is that this value is also used to set the 
SOVERSION so it's indeed needed.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529

Files:
  libcxx/CMakeLists.txt


Index: libcxx/CMakeLists.txt
===
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -97,7 +97,12 @@
 cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
 "Install libc++experimental.a" ON
 "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
-set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
+if (FUCHSIA)
+  set(DEFAULT_ABI_VERSION 2)
+else()
+  set(DEFAULT_ABI_VERSION 1)
+endif()
+set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of 
libc++.")
 option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the 
Itanium ABI.")
 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the 
Microsoft ABI.")
@@ -619,7 +624,7 @@
 endif()
 
 # Configuration file flags 
=
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)


Index: libcxx/CMakeLists.txt
===
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -97,7 +97,12 @@
 cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
 "Install libc++experimental.a" ON
 "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
-set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
+if (FUCHSIA)
+  set(DEFAULT_ABI_VERSION 2)
+else()
+  set(DEFAULT_ABI_VERSION 1)
+endif()
+set(LIBCXX_ABI_VERSION ${DEFAULT_ABI_VERSION} CACHE STRING "ABI version of libc++.")
 option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
@@ -619,7 +624,7 @@
 endif()
 
 # Configuration file flags =
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL DEFAULT_ABI_VERSION)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-11 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment.

This LGTM given that Eric accepted your previous change. I'm happy to accept it 
in a day or two if he hasn't gotten the chance to take a look by then.




Comment at: libcxx/CMakeLists.txt:101
+if (FUCHSIA)
+  set(ABI_VERSION_DEFAULT 2)
+else()

I prefer `DEFAULT_ABI_VERSION` to `ABI_VERSION_DEFAULT`


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-11 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment.

ping?


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D45529: [CMake] Set the default ABI version for Fuchsia in CMake as well

2018-04-11 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision.
phosek added reviewers: EricWF, beanz.
Herald added subscribers: cfe-commits, christof, mgorny.

This is neeeded since the CMake value is used for the SOVERSION.


Repository:
  rCXX libc++

https://reviews.llvm.org/D45529

Files:
  libcxx/CMakeLists.txt


Index: libcxx/CMakeLists.txt
===
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -97,7 +97,12 @@
 cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
 "Install libc++experimental.a" ON
 "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
-set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
+if (FUCHSIA)
+  set(ABI_VERSION_DEFAULT 2)
+else()
+  set(ABI_VERSION_DEFAULT 1)
+endif()
+set(LIBCXX_ABI_VERSION ${ABI_VERSION_DEFAULT} CACHE STRING "ABI version of 
libc++.")
 option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the 
Itanium ABI.")
 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the 
Microsoft ABI.")
@@ -619,7 +624,7 @@
 endif()
 
 # Configuration file flags 
=
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL ABI_VERSION_DEFAULT)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)


Index: libcxx/CMakeLists.txt
===
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -97,7 +97,12 @@
 cmake_dependent_option(LIBCXX_INSTALL_EXPERIMENTAL_LIBRARY
 "Install libc++experimental.a" ON
 "LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY;LIBCXX_INSTALL_LIBRARY" OFF)
-set(LIBCXX_ABI_VERSION 1 CACHE STRING "ABI version of libc++.")
+if (FUCHSIA)
+  set(ABI_VERSION_DEFAULT 2)
+else()
+  set(ABI_VERSION_DEFAULT 1)
+endif()
+set(LIBCXX_ABI_VERSION ${ABI_VERSION_DEFAULT} CACHE STRING "ABI version of libc++.")
 option(LIBCXX_ABI_UNSTABLE "Unstable ABI of libc++." OFF)
 option(LIBCXX_ABI_FORCE_ITANIUM "Ignore auto-detection and force use of the Itanium ABI.")
 option(LIBCXX_ABI_FORCE_MICROSOFT "Ignore auto-detection and force use of the Microsoft ABI.")
@@ -619,7 +624,7 @@
 endif()
 
 # Configuration file flags =
-if (NOT LIBCXX_ABI_VERSION EQUAL "1")
+if (NOT LIBCXX_ABI_VERSION EQUAL ABI_VERSION_DEFAULT)
   config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 endif()
 config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE)
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits