[Lldb-commits] [PATCH] D65330: [lldb][docs] Update documentation for monorepo and CMake caches

2019-07-27 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz updated this revision to Diff 212051.
sgraenitz marked 11 inline comments as done.
sgraenitz added a comment.

Address recent feedback


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65330/new/

https://reviews.llvm.org/D65330

Files:
  lldb/docs/resources/build.rst

Index: lldb/docs/resources/build.rst
===
--- lldb/docs/resources/build.rst
+++ lldb/docs/resources/build.rst
@@ -78,23 +78,84 @@
 * If you are building both Clang and LLDB together, be sure to also check out
   libc++, which is a required for testing on macOS.
 
-Building LLDB with CMake & Ninja
-
+Building LLDB with CMake
+
+
+The LLVM project is migrating to a single monolithic respository for LLVM and
+its subprojects. This is the recommended way to build LLDB. Check out the
+source-tree with git:
+
+::
+
+  > git clone https://github.com/llvm/llvm-project.git
 
 CMake is a cross-platform build-generator tool. CMake does not build the
-project, it generates the files needed by your build tool. Assuming you're
-using Ninja, the invocation looks like this:
+project, it generates the files needed by your build tool. The recommended
+build tool for LLVM is Ninja. Please also read `Building LLVM with CMake
+`_.
+
+Regular in-tree builds
+**
+
+Create a new directory for your build-tree. From there run CMake and point it
+to the ``llvm`` directory in the source-tree:
 
 ::
 
-  > cmake -G Ninja  
+  > cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" [] path/to/llvm-project/llvm
 
-Once CMake has configured your build, you can run ``ninja`` to build LLDB.
+We used the ``LLVM_ENABLE_PROJECTS`` option here to tell the build-system which
+subprojects to build in addition to LLVM (for more options see
+:ref:`CommonCMakeOptions` and :ref:`CMakeCaches`). Parts of the LLDB test suite
+require `lld`. Add it to the list in order to run all tests. Once CMake is done,
+run ninja to perform the actual build. We pass ``lldb`` here as the target, so
+it only builds what is necessary to run the lldb driver:
 
 ::
 
   > ninja lldb
 
+Standalone builds
+*
+
+This is another way to build LLDB. We can use the same source-tree as we
+checked out above, but now we will have two build-trees:
+
+* the main build-tree for LLDB in ``/path/to/lldb-build``
+* a provided build-tree for LLVM and Clang in ``/path/to/llvm-build``
+
+Run CMake with ``-B`` pointing to a new directory for the provided build-tree
+and the positional argument pointing to the ``llvm`` directory in the
+source-tree. Note that we leave out LLDB here and only include Clang.
+Then we build the ``ALL`` target with ninja:
+
+::
+
+  > cmake -B /path/to/llvm-build -G Ninja \
+  -DLLVM_ENABLE_PROJECTS=clang \
+  [] /path/to/llvm-project/llvm
+  > ninja
+
+Now run CMake a second time with ``-B`` pointing to a new directory for the
+main build-tree and the positional argument pointing to the ``lldb`` directory
+in the source-tree. In order to find the provided build-tree, the build-system
+needs the options ``LLVM_DIR`` and ``Clang_DIR`` (CMake variables are
+case-sensitive!):
+
+::
+
+  > cmake -B /path/to/lldb-build -G Ninja \
+  -DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
+  -DClang_DIR=/path/to/llvm-build/lib/cmake/clang \
+  [] /path/to/llvm-project/lldb
+  > ninja lldb
+
+
+.. _CommonCMakeOptions:
+
+Common CMake options
+
+
 Following is a description of some of the most important CMake variables which
 you are likely to encounter. A variable FOO is set by adding ``-DFOO=value`` to
 the CMake command line.
@@ -128,7 +189,7 @@
 test execution.
 
 Windows
-***
+^^^
 
 Although the following CMake variables are by no means Windows specific, they
 are commonly used on Windows.
@@ -161,8 +222,27 @@
   -DLLDB_TEST_C_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
   
 
+
+Building with ninja is both faster and simpler than building with Visual Studio,
+but chances are you still want to debug LLDB with an IDE. One solution is to run
+cmake twice and generate the output into two different folders. One for
+compiling (the ninja folder), and one for editing, browsing and debugging.
+
+Follow the previous instructions in one directory, and generate a Visual Studio
+project in another directory.
+
+::
+
+  > cmake -G "Visual Studio 15 2017 Win64" -Thost=x64  
+
+Then you can open the .sln file in Visual Studio, set lldb as the startup
+project, and use F5 to run it. You need only edit the project settings to set
+the executable and the working directory to point to binaries inside of the
+ninja tree.
+
+
 NetBSD
-**
+^^
 
 Current stable NetBSD release doesn't ship with libpanel(3), therefore it's
 required to disable curses(3) support with the
@@ -170,48 +250,71 @@
 ``/usr/inc

[Lldb-commits] [PATCH] D65330: [lldb][docs] Update documentation for monorepo and CMake caches

2019-07-27 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz marked an inline comment as done.
sgraenitz added a comment.

Hi Greg, thanks for your feedback.

> Can we add a section for "Building LLDB with Xcode"? We had a shell script 
> patch that was going to be checked in, not sure if it made it. But it did a 
> two part thing where it built LLVM and clang and then generated an Xcode 
> project.

"Build LLDB standalone for development with Xcode" describes it, see 
http://tiny.cc/i5ncaz#common-configurations-on-macos

> I would rather just produce the Xcode project using cmake, very similar to 
> other instructions.

This means changing the generator from Ninja to Xcode. I added a short note 
that //other generators like Xcode or Visual Studio may be used as well// 
(maybe we can avoid calling it "support", because in fact multi-config 
generators cause a lot of trouble).

> My mac cmake line has:
> 
>   cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;libcxx;lldb" 
> -DCMAKE_BUILD_TYPE:STRING=Debug -DLLVM_ENABLE_ASSERTIONS:BOOL=TRUE 
> -DLLDB_BUILD_FRAMEWORK:BOOL=TRUE -DLLDB_USE_SYSTEM_DEBUGSERVER=ON 
> /path/to/llvm-project/llvm

`LLVM_ENABLE_ASSERTIONS` and many other important flags are documented in LLVM 
(linked from http://tiny.cc/i5ncaz#building-lldb-with-cmake).
`CMAKE_BUILD_TYPE=Debug` is the default
`LLDB_BUILD_FRAMEWORK` and `LLDB_USE_SYSTEM_DEBUGSERVER` are explained in the 
`macOS` section, see http://tiny.cc/i5ncaz#id2.

> Important bits are the projects being set to "clang;libcxx;lldb" (include 
> libcxx) and building the framework and using the system debugserver

Added an explanation for the test suite libcxx dependency to the `macOS` 
section too.




Comment at: lldb/docs/resources/build.rst:94
+project, it generates the files needed by your build tool. The recommended
+build tool for LLVM is Ninja. Please also read `Building LLVM with CMake
+`_.

amccarth wrote:
> stella.stamenova wrote:
> > sgraenitz wrote:
> > > stella.stamenova wrote:
> > > > Is Ninja the recommended build tool on Windows as well?
> > > Well it's recommended for LLVM and I used it for LLDB on Windows in the 
> > > past.
> > > Maybe @zturner knows more about it?
> > LLDB does build with both Ninja and VS on Windows. I don't know that either 
> > one is "recommended" though and we usually build with VS.
> I use Ninja exclusively for both LLVM in general and LLDB in particular, 
> regardless of whether I'm building with MSVC or bootstrapping with Clang.
> 
> Having a VS solution is great for finding your way around the repo and 
> debugging.  But Ninja seems to build much faster.
I added a short note that //other generators like Xcode or Visual Studio may be 
used as well// (please see my answer to Greg).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65330/new/

https://reviews.llvm.org/D65330



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


[Lldb-commits] [PATCH] D65330: [lldb][docs] Update documentation for monorepo and CMake caches

2019-07-27 Thread Stefan Gränitz via Phabricator via lldb-commits
sgraenitz updated this revision to Diff 212052.
sgraenitz added a comment.

Feedback and polishing; latest rendered output here: http://tiny.cc/i5ncaz


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65330/new/

https://reviews.llvm.org/D65330

Files:
  lldb/docs/resources/build.rst

Index: lldb/docs/resources/build.rst
===
--- lldb/docs/resources/build.rst
+++ lldb/docs/resources/build.rst
@@ -78,23 +78,85 @@
 * If you are building both Clang and LLDB together, be sure to also check out
   libc++, which is a required for testing on macOS.
 
-Building LLDB with CMake & Ninja
-
+Building LLDB with CMake
+
+
+The LLVM project is migrating to a single monolithic respository for LLVM and
+its subprojects. This is the recommended way to build LLDB. Check out the
+source-tree with git:
+
+::
+
+  > git clone https://github.com/llvm/llvm-project.git
 
 CMake is a cross-platform build-generator tool. CMake does not build the
-project, it generates the files needed by your build tool. Assuming you're
-using Ninja, the invocation looks like this:
+project, it generates the files needed by your build tool. The recommended
+build tool for LLVM is Ninja, but other generators like Xcode or Visual Studio
+may be used as well. Please also read `Building LLVM with CMake
+`_.
+
+Regular in-tree builds
+**
+
+Create a new directory for your build-tree. From there run CMake and point it
+to the ``llvm`` directory in the source-tree:
 
 ::
 
-  > cmake -G Ninja  
+  > cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;lldb" [] path/to/llvm-project/llvm
 
-Once CMake has configured your build, you can run ``ninja`` to build LLDB.
+We used the ``LLVM_ENABLE_PROJECTS`` option here to tell the build-system which
+subprojects to build in addition to LLVM (for more options see
+:ref:`CommonCMakeOptions` and :ref:`CMakeCaches`). Parts of the LLDB test suite
+require ``lld``. Add it to the list in order to run all tests. Once CMake is done,
+run ninja to perform the actual build. We pass ``lldb`` here as the target, so
+it only builds what is necessary to run the lldb driver:
 
 ::
 
   > ninja lldb
 
+Standalone builds
+*
+
+This is another way to build LLDB. We can use the same source-tree as we
+checked out above, but now we will have two build-trees:
+
+* the main build-tree for LLDB in ``/path/to/lldb-build``
+* a provided build-tree for LLVM and Clang in ``/path/to/llvm-build``
+
+Run CMake with ``-B`` pointing to a new directory for the provided build-tree
+and the positional argument pointing to the ``llvm`` directory in the
+source-tree. Note that we leave out LLDB here and only include Clang.
+Then we build the ``ALL`` target with ninja:
+
+::
+
+  > cmake -B /path/to/llvm-build -G Ninja \
+  -DLLVM_ENABLE_PROJECTS=clang \
+  [] /path/to/llvm-project/llvm
+  > ninja
+
+Now run CMake a second time with ``-B`` pointing to a new directory for the
+main build-tree and the positional argument pointing to the ``lldb`` directory
+in the source-tree. In order to find the provided build-tree, the build-system
+needs the options ``LLVM_DIR`` and ``Clang_DIR`` (CMake variables are
+case-sensitive!):
+
+::
+
+  > cmake -B /path/to/lldb-build -G Ninja \
+  -DLLVM_DIR=/path/to/llvm-build/lib/cmake/llvm \
+  -DClang_DIR=/path/to/llvm-build/lib/cmake/clang \
+  [] /path/to/llvm-project/lldb
+  > ninja lldb
+
+
+.. _CommonCMakeOptions:
+
+Common CMake options
+
+
 Following is a description of some of the most important CMake variables which
 you are likely to encounter. A variable FOO is set by adding ``-DFOO=value`` to
 the CMake command line.
@@ -128,7 +190,7 @@
 test execution.
 
 Windows
-***
+^^^
 
 Although the following CMake variables are by no means Windows specific, they
 are commonly used on Windows.
@@ -161,8 +223,27 @@
   -DLLDB_TEST_C_COMPILER=d:\src\llvmbuild\ninja_release\bin\clang.exe^
   
 
+
+Building with ninja is both faster and simpler than building with Visual Studio,
+but chances are you still want to debug LLDB with an IDE. One solution is to run
+cmake twice and generate the output into two different folders. One for
+compiling (the ninja folder), and one for editing, browsing and debugging.
+
+Follow the previous instructions in one directory, and generate a Visual Studio
+project in another directory.
+
+::
+
+  > cmake -G "Visual Studio 15 2017 Win64" -Thost=x64  
+
+Then you can open the .sln file in Visual Studio, set lldb as the startup
+project, and use F5 to run it. You need only edit the project settings to set
+the executable and the working directory to point to binaries inside of the
+ninja tree.
+
+
 NetBSD
-**
+^^
 
 Current stable NetBSD release doesn't ship with libpanel(3), therefore it's
 r

[Lldb-commits] [lldb] r367186 - [lldb] Also include the array definition in CommandOptions.inc

2019-07-27 Thread Raphael Isemann via lldb-commits
Author: teemperor
Date: Sat Jul 27 23:24:07 2019
New Revision: 367186

URL: http://llvm.org/viewvc/llvm-project?rev=367186&view=rev
Log:
[lldb] Also include the array definition in CommandOptions.inc

Summary:
Right now our CommandOptions.inc only generates the initializer for the options 
list but
not the array declaration boilerplate around it. As the array definition is 
identical for all arrays,
we might as well also let the CommandOptions.inc generate it alongside the 
initializers.

This patch will also allow us to generate additional declarations related to 
that option list in
the future (e.g. a enum class representing the specific options which would 
make our
handling code less prone).

This patch also fixes a few option tables that didn't follow our naming style.

Reviewers: JDevlieghere

Reviewed By: JDevlieghere

Subscribers: abidh, lldb-commits

Tags: #lldb

Differential Revision: https://reviews.llvm.org/D65331

Modified:
lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
lldb/trunk/source/Commands/CommandObjectCommands.cpp
lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
lldb/trunk/source/Commands/CommandObjectExpression.cpp
lldb/trunk/source/Commands/CommandObjectFrame.cpp
lldb/trunk/source/Commands/CommandObjectHelp.cpp
lldb/trunk/source/Commands/CommandObjectLog.cpp
lldb/trunk/source/Commands/CommandObjectMemory.cpp
lldb/trunk/source/Commands/CommandObjectPlatform.cpp
lldb/trunk/source/Commands/CommandObjectProcess.cpp
lldb/trunk/source/Commands/CommandObjectRegister.cpp
lldb/trunk/source/Commands/CommandObjectSettings.cpp
lldb/trunk/source/Commands/CommandObjectSource.cpp
lldb/trunk/source/Commands/CommandObjectTarget.cpp
lldb/trunk/source/Commands/CommandObjectThread.cpp
lldb/trunk/source/Commands/CommandObjectType.cpp
lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
lldb/trunk/utils/TableGen/LLDBOptionDefEmitter.cpp

Modified: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp?rev=367186&r1=367185&r2=367186&view=diff
==
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp (original)
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp Sat Jul 27 23:24:07 
2019
@@ -44,10 +44,9 @@ static void AddBreakpointDescription(Str
 
 // Modifiable Breakpoint Options
 #pragma mark Modify::CommandOptions
-static constexpr OptionDefinition g_breakpoint_modify_options[] = {
 #define LLDB_OPTIONS_breakpoint_modify
 #include "CommandOptions.inc"
-};
+
 class lldb_private::BreakpointOptionGroup : public OptionGroup
 {
 public:
@@ -181,10 +180,9 @@ public:
   BreakpointOptions m_bp_opts;
 
 };
-static constexpr OptionDefinition g_breakpoint_dummy_options[] = {
+
 #define LLDB_OPTIONS_breakpoint_dummy
 #include "CommandOptions.inc"
-};
 
 class BreakpointDummyOptionGroup : public OptionGroup
 {
@@ -224,10 +222,8 @@ public:
 
 };
 
-static constexpr OptionDefinition g_breakpoint_set_options[] = {
 #define LLDB_OPTIONS_breakpoint_set
 #include "CommandOptions.inc"
-};
 
 // CommandObjectBreakpointSet
 
@@ -1154,10 +1150,8 @@ protected:
 // CommandObjectBreakpointList
 
 #pragma mark List::CommandOptions
-static constexpr OptionDefinition g_breakpoint_list_options[] = {
 #define LLDB_OPTIONS_breakpoint_list
 #include "CommandOptions.inc"
-};
 
 #pragma mark List
 
@@ -1311,10 +1305,8 @@ private:
 // CommandObjectBreakpointClear
 #pragma mark Clear::CommandOptions
 
-static constexpr OptionDefinition g_breakpoint_clear_options[] = {
 #define LLDB_OPTIONS_breakpoint_clear
 #include "CommandOptions.inc"
-};
 
 #pragma mark Clear
 
@@ -1462,10 +1454,8 @@ private:
 };
 
 // CommandObjectBreakpointDelete
-static constexpr OptionDefinition g_breakpoint_delete_options[] = {
 #define LLDB_OPTIONS_breakpoint_delete
 #include "CommandOptions.inc"
-};
 
 #pragma mark Delete
 
@@ -1614,11 +1604,9 @@ private:
 };
 
 // CommandObjectBreakpointName
-
-static constexpr OptionDefinition g_breakpoint_name_options[] = {
 #define LLDB_OPTIONS_breakpoint_name
 #include "CommandOptions.inc"
-};
+
 class BreakpointNameOptionGroup : public OptionGroup {
 public:
   BreakpointNameOptionGroup()
@@ -1680,10 +1668,8 @@ public:
   OptionValueString m_help_string;
 };
 
-static constexpr OptionDefinition g_breakpoint_access_options[] = {
 #define LLDB_OPTIONS_breakpoint_access
 #include "CommandOptions.inc"
-};
 
 class BreakpointAccessOptionGroup : public OptionGroup {
 public:
@@ -2142,10 +2128,8 @@ public:
 
 // CommandObjectBreakpointRead
 #pragma mark Read::CommandOptions
-static constexpr OptionDefinition g_breakpoint_read_options[] = {
 #define LLDB_OPTIONS_breakpoint_read
 #include "CommandOptions.inc"
-};
 
 #pragma mark Read
 

[Lldb-commits] [PATCH] D65331: [lldb] Also include the array definition in CommandOptions.inc

2019-07-27 Thread Raphael Isemann via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rL367186: [lldb] Also include the array definition in 
CommandOptions.inc (authored by teemperor, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D65331?vs=211924&id=212078#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65331/new/

https://reviews.llvm.org/D65331

Files:
  lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
  lldb/trunk/source/Commands/CommandObjectBreakpointCommand.cpp
  lldb/trunk/source/Commands/CommandObjectCommands.cpp
  lldb/trunk/source/Commands/CommandObjectDisassemble.cpp
  lldb/trunk/source/Commands/CommandObjectExpression.cpp
  lldb/trunk/source/Commands/CommandObjectFrame.cpp
  lldb/trunk/source/Commands/CommandObjectHelp.cpp
  lldb/trunk/source/Commands/CommandObjectLog.cpp
  lldb/trunk/source/Commands/CommandObjectMemory.cpp
  lldb/trunk/source/Commands/CommandObjectPlatform.cpp
  lldb/trunk/source/Commands/CommandObjectProcess.cpp
  lldb/trunk/source/Commands/CommandObjectRegister.cpp
  lldb/trunk/source/Commands/CommandObjectSettings.cpp
  lldb/trunk/source/Commands/CommandObjectSource.cpp
  lldb/trunk/source/Commands/CommandObjectTarget.cpp
  lldb/trunk/source/Commands/CommandObjectThread.cpp
  lldb/trunk/source/Commands/CommandObjectType.cpp
  lldb/trunk/source/Commands/CommandObjectWatchpoint.cpp
  lldb/trunk/source/Commands/CommandObjectWatchpointCommand.cpp
  lldb/trunk/utils/TableGen/LLDBOptionDefEmitter.cpp

Index: lldb/trunk/utils/TableGen/LLDBOptionDefEmitter.cpp
===
--- lldb/trunk/utils/TableGen/LLDBOptionDefEmitter.cpp
+++ lldb/trunk/utils/TableGen/LLDBOptionDefEmitter.cpp
@@ -129,18 +129,21 @@
 /// Emits all option initializers to the raw_ostream.
 static void emitOptions(std::string Command, std::vector Option,
 raw_ostream &OS) {
+  std::string ID = Command;
+  std::replace(ID.begin(), ID.end(), ' ', '_');
   // Generate the macro that the user needs to define before including the
   // *.inc file.
-  std::string NeededMacro = "LLDB_OPTIONS_" + Command;
-  std::replace(NeededMacro.begin(), NeededMacro.end(), ' ', '_');
+  std::string NeededMacro = "LLDB_OPTIONS_" + ID;
 
   // All options are in one file, so we need put them behind macros and ask the
   // user to define the macro for the options that are needed.
   OS << "// Options for " << Command << "\n";
   OS << "#ifdef " << NeededMacro << "\n";
+  OS << "constexpr static OptionDefinition g_" + ID + "_options[] = {\n";
   for (Record *R : Option)
 emitOption(R, OS);
   // We undefine the macro for the user like Clang's include files are doing it.
+  OS << "};\n";
   OS << "#undef " << NeededMacro << "\n";
   OS << "#endif // " << Command << " command\n\n";
 }
Index: lldb/trunk/source/Commands/CommandObjectSettings.cpp
===
--- lldb/trunk/source/Commands/CommandObjectSettings.cpp
+++ lldb/trunk/source/Commands/CommandObjectSettings.cpp
@@ -20,11 +20,8 @@
 using namespace lldb_private;
 
 // CommandObjectSettingsSet
-
-static constexpr OptionDefinition g_settings_set_options[] = {
 #define LLDB_OPTIONS_settings_set
 #include "CommandOptions.inc"
-};
 
 class CommandObjectSettingsSet : public CommandObjectRaw {
 public:
@@ -309,11 +306,8 @@
 };
 
 // CommandObjectSettingsWrite -- Write settings to file
-
-static constexpr OptionDefinition g_settings_write_options[] = {
 #define LLDB_OPTIONS_settings_write
 #include "CommandOptions.inc"
-};
 
 class CommandObjectSettingsWrite : public CommandObjectParsed {
 public:
@@ -432,11 +426,8 @@
 };
 
 // CommandObjectSettingsRead -- Read settings from file
-
-static constexpr OptionDefinition g_settings_read_options[] = {
 #define LLDB_OPTIONS_settings_read
 #include "CommandOptions.inc"
-};
 
 class CommandObjectSettingsRead : public CommandObjectParsed {
 public:
Index: lldb/trunk/source/Commands/CommandObjectExpression.cpp
===
--- lldb/trunk/source/Commands/CommandObjectExpression.cpp
+++ lldb/trunk/source/Commands/CommandObjectExpression.cpp
@@ -47,10 +47,8 @@
   return OptionEnumValues(g_description_verbosity_type);
 }
 
-static constexpr OptionDefinition g_expression_options[] = {
 #define LLDB_OPTIONS_expression
 #include "CommandOptions.inc"
-};
 
 Status CommandObjectExpression::CommandOptions::SetOptionValue(
 uint32_t option_idx, llvm::StringRef option_arg,
Index: lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
===
--- lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
+++ lldb/trunk/source/Commands/CommandObjectBreakpoint.cpp
@@ -44,10 +44,9 @@
 
 // Modifiable Breakpoint Options
 #pragma mark Modify::CommandOptions
-static constexpr OptionDefini