-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
如何分别给 c代码和 C++代码设定编译参数 #4844
Labels
Comments
把特别的部分分离成库,多项目协作 |
这部分好像问题是出现在SConstruct里, env = Environment(tools = ['mingw'],
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
CXX = rtconfig.CXX, CXXFLAGS = rtconfig.CXXFLAGS,
AR = rtconfig.AR, ARFLAGS = '-rc',
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS) 其中的CCFLAGS是代表了C和C++的参数,需要分离开来。但是目前所有BSP似乎都是CCFLAGS了…… |
如果 CCFLAGS 是C和C++公共的参数,那 CFLAGS 和 CXXFLAGS 就应该仅包含各自独立的参数了?比如 ' -xc' 和 ' -xc++' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
按照下面这种写法,先把 CFlags 赋值给 CXXFlags,然后再单独给 CFlag 添加参数。编译时,新添加的参数仍然会传递给 CXX 编译器。
bsp: stm32-f429-apollo
编译器:armclang.
The text was updated successfully, but these errors were encountered: