Chrome V8 engine options - c++

I know that Chrome V8 Engine has some option that can be set like "command-line" flags using v8::V8::SetFlagsFromString(). But where can I find description of the each flag? I did not succeed with googling for this info so far. Does anyone know the place in documentation or some other resource that describes V8 flags?

You will get the actual list for your V8 version in a source file flag-definitions.h
As I remember, there is a --help flag in V8, that prints allowed flags and terminates. You can run node --v8-options to see the options for V8 version used in the Nodejs.
There is also https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md

Related

How to setup Neovim with LSP ( Clangd)

I'm tring to set-up neovim for competetive-programming in c++ . And I think showing error while typing code would help me alot thus i need to set-up lsp in neovim, i have tried Nighty Build neovim but i was not working in gnome-terminal so i even switched to Alacrity but still i was not able to set-up LSP properly .
My requirements : I just need my nvim to show errors in my code while I'm typing (No need for auto complete or auto import).
Is it even possible in neovim and if anybody know so then please help me in setting up my nvim.
(I need my vim to show errors as in the image)
Lots of ways. This one is pretty simple:
Install lunarvim
lvim
:LspInstall clangd
I have been stuck with this problem. I use GCC compiler (g++) for C++ and did not wanted to download Clang or LLVM. Finally, I got the solution that you don't need to download Clang in order to use Clangd.
Follow these steps.
Download binary of Clangd from official Clangd github page
Extract it and save it in your disk wherever you want (I prefer to save it in somewhere, where elevated commands are not required.
Add the binary (See bin folder inside your downloaded folder) to the path. Note that Clangd binary depends on include that come with it. So I do not keep them separate.
To test if every thing is fine, type Clangd in your terminal and see if it's working. Server starts then you are good to go.
By using this method you ditched Clang and LLVM file.
Note Clangd does not support #include<bits/stdc++.h because it is only a part if GCC compiler. Similarly, INT_MAX, INT_MIN are not supported by clang but Rather INT32_MIN, INT32_MAX.
Here's my setup
Neovim with Native LSP

llc has no debug or -view-dag-combine1-dags option

I have llc program installed on my computer via package manager (of course I have LLVM installed, 6.0.0 version). Also, I have it built from sources. What I want is to view DAGs, generated by llvm. But, unfortunately, I don't have any of options like -debug, -view-dag-combine1-dags and etc on both versions of llc. This drives me crazy since it is written everywhere, that this flags should help me, but it is not mentioned what to do if I don't have them. In help and man, there are no such options. I have graphviz, dot and gv installed, it should not be the problem.
Version of compiled llc.
./llc -version
LLVM (http://llvm.org/):
LLVM version 7.0.0svn
Optimized build.
Default target: x86_64-unknown-linux-gnu
Host CPU: broadwell
Registered Targets:
and targets...
I've built it with RelWithDebugInfo flag, maybe I should've built it with Debug flag? Or is there any flag in cmake, that I should enable? I believe that I've googled enough and I couldn't find any information.
Executing llc --help-hidden | grep view-dag using my debug build results in:
-filter-view-dags= -
Only display the basic block whose name matches this for all
view-*-dags options
-view-dag-combine-lt-dags - Pop up a window to show dags before the post legalize types dag combine
pass
-view-dag-combine1-dags - Pop up a window to show dags before the first dag combine pass
-view-dag-combine2-dags - Pop up a window to show dags before the second dag combine pass
If you look into llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp, that command-line option is between #ifndef NDEBUG preprocessor statements, so those options are only exposed when you have a debug build.
Changing the CMAKE_BUILD_TYPE to Debug and recompiling should be enough.
I did it and it works.
$ cmake -DCMAKE_BUILD_TYPE:STRING=Debug
You can check: https://github.com/llvm/llvm-project/blob/master/llvm/docs/CMake.rst#id5
and if you want to check DAGs then maybe it helps you.
here: https://stackoverflow.com/a/52095047/12365658

using gtest with xcode

I'm trying to set up a c++ unit testing library on my computer and figured that google's gtest would be a good fit.
I am currently running mountain lion with the most recent release of xcode.
I have been attempting to follow the instructions found here but am running into an intresting problem.
I am opening the gtest project, building it, and even though xcode tells me that the build was successful, I cant seem to find the framework anywhere. any help on this subject would be highly appreciated!
Thank you!
This worked for me:
Get the code from https://github.com/dmonopoly/gtest-cmake-example
Run the cmake GUI in the usual way (I used version 3.0.0). Hit "Configure", one of the prompts allows you to choose XCode generation. Hit configure again, Enable the "test" config option, hit configure again (and maybe even once again), then hit "Generate".
You should now be able to find the XCode project in the build directory that you specified. Open that project, and you will find the gtest source code, some demo test code, as well as a target for running the tests.

using libtool gdb from within geany

I'm working on a project that uses GNU autotools, so in order to debug the code using gdb, I'm running gdb from within libtool:
libtool --mode=execute gdbtui foobar
Is it possible to somehow do this from within the geany IDE? Or to somehow run libtool e geany instead of gdb?
Besides the actual debugging plugins Debugger and the more recent and maintained Scope plugins, you can run arbitrary build commands in Geany itself. The latter is described in the manual as well as by a helpful article on the wiki.
The basic idea is that you need to use the Build menu's "Set Build Commands" dialog to configure custom commands as described in the manual (with nice screenshots and descriptions of all the fields and placeholders). You can access the manual for your current version from the Help menu inside Geany.

Eclipse plugin for c/c++ call graph generator not working properly

I have installed eclipse plugin for call graph generator using the following link.
http://certiv.net/updates/
That plugin has been successfuly installed as I can checked that from installed plugins in eclipse.
Now problem is still I am unable to view option op generating call graph under project explorer->right click on the project whose call graph u want to create-> profile as-> call graph
as shown in the following link.
This link is for linux but i have installed this plugin on windows platform.
http://wiki.eclipse.org/Linux_Tools_Project/Callgraph/User_Guide
Can anybody help me how do i need to configure eclipse for generation of call graphs. I am using eclipse galileo.
According to the user guide Callgraph is using SystemTap, which is absolutely linux specific and thus it will never work on windows (at least as long as only SystemTap is the only supported way to retrieve information).