Comments (9)
Bot detected the issue body's language is not English, translate it automatically.
Title: How to easily remove some built-in compilation parameters
In what scenario do you need this feature?
For example, in coverage or debug mode, xmake will bring many compilation parameters. For example, nvcc will bring {"-G", "-g", "-lineinfo"}
, but for some special reasons Requirements, for example, we remove the -G parameter and write in the global scope of xmake.lua in the root directory:
if is_mode("coverage") then
remove_cuflags("-G")
end
This is the most convenient, but it doesn't actually work.
Even if I want to remove cuflags in after_load it doesn't work because when target:get("cuflags") is printed, -G is not among them.
Describe possible solutions
Provide a solution to remove the built-in compilation parameters of xmake.
Describe your alternatives
No response
other information
No response
from xmake.
不写add_rules("mode.debug"),自己判断is_mode("debug")加相关flag试试?
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
Instead of writing add_rules("mode.debug"), try judging is_mode("debug") and adding relevant flags yourself?
from xmake.
不写add_rules("mode.debug"),自己判断is_mode("debug")加相关flag试试?
那相当于整个 mode.coverage 都得自己重新写,可以试试,但感觉比较麻烦,为了去掉一个参数将内置的一些 rule 整个重写了,还有一些 rule 更复杂比如 protobuf.cpp,不太好重写
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
Instead of writing add_rules("mode.debug"), try judging is_mode("debug") and adding relevant flags yourself?
That's equivalent to having to rewrite the entire mode.coverage yourself. You can try it, but it seems troublesome. In order to remove a parameter, some built-in rules have been completely rewritten. There are also some rules that are more complicated, such as protobuf.cpp, which is not good. rewrite
from xmake.
set_symbols("none") 或者自定义 debug mode
from xmake.
"
好的
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
set_symbols("none") or customize debug mode
from xmake.
Bot detected the issue body's language is not English, translate it automatically.
"
OK
from xmake.
Related Issues (20)
- links not found when add_deps("openmp") HOT 10
- 支持在 xmake-repo 下发 toolchain 和 opiton HOT 9
- 添加`qt5widget`包后,xmake的qt规则无法自动识别qt路径 HOT 7
- How to set llvm-rc's options on msys2/clangarm64? HOT 1
- No way to set build type in `qt.deploy.flags` passed to windeployqt HOT 1
- Improve copy pdb when using ninja on Windows HOT 11
- 引用外部库时如何使用预编译头文件的功能 HOT 5
- 解决rc文件不会重新编译的问题 HOT 15
- 升级 xmake 后,包构建失败:package(nlohmann-json): links not found! HOT 4
- Linux系统编译多出-framework选项 HOT 13
- Cannot create static library providing C++ module HOT 13
- 多target的项目中,使用add_shflags("/NOENTRY")的纯资源动态库项目会对其它shared项目产生影响 HOT 3
- 本地定义的 package 无法替换掉间接依赖 HOT 27
- 无法安装依赖 HOT 7
- compile_commands.json 中的 ifc 文件相对路径无法被 VS Code IntelliSense 识别 HOT 8
- Qt deploy with MinGW is not working in release mode HOT 8
- set_warnings 隔离 nvcc 和 cxx HOT 15
- cannot build shared memory with MSVC module HOT 1
- Add bindirs for package
- Add `utils.binary.rpath` native implemetion
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xmake.