You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/09/14 14:48:44 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a diff in pull request #7094: arch/toolchain: migrate the toolchain define to arch/Kconfig.toolchain

xiaoxiang781216 commented on code in PR #7094:
URL: https://github.com/apache/incubator-nuttx/pull/7094#discussion_r970906867


##########
arch/Kconfig:
##########
@@ -230,57 +230,7 @@ endmenu # Custom Chip Configuration
 endif #ARCH_CHIP_CUSTOM
 
 source "arch/dummy/Kconfig"
-
-config ARCH_TOOLCHAIN_IAR
-	bool
-	default n
-
-config ARCH_TOOLCHAIN_GNU
-	bool
-	default n
-
-config ARCH_TOOLCHAIN_CLANG
-	bool
-	select ARCH_TOOLCHAIN_GNU
-	default n
-
-choice
-	prompt "Link Time Optimization (LTO)"
-	default LTO_NONE
-	---help---
-		This option enables Link Time Optimization (LTO), which allows the
-		compiler to optimize binaries globally.
-
-		If unsure, select LTO_NONE. Note that LTO is very resource-intensive
-		so it's disabled by default.
-
-config LTO_NONE
-	bool "None"
-	---help---
-		Build the kernel normally, without Link Time Optimization (LTO).
-
-config LTO_FULL
-	bool "GNU Full LTO (EXPERIMENTAL)"
-	depends on ARCH_TOOLCHAIN_GNU
-	---help---
-		Link time optimization is implemented as a GCC front end for a bytecode
-		bytecode representation of GIMPLE that is emitted in special sections
-		of .o files. Currently, LTO support is enabled in most ELF-based systems,
-		as well as darwin, cygwin and mingw systems.
-
-config LTO_THIN
-	bool "Clang ThinLTO (EXPERIMENTAL)"
-	depends on ARCH_TOOLCHAIN_CLANG
-	---help---
-		This option enables Clang's ThinLTO, which allows for parallel
-		optimization and faster incremental compiles compared to the
-		CONFIG_LTO_FULL option. More information can be found
-		from Clang's documentation:
-
-		https://clang.llvm.org/docs/ThinLTO.html
-
-		If unsure, say Y.
-endchoice
+source "arch/Kconfig.toolchain"

Review Comment:
   why split to Kconfig.toolchain?



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU

Review Comment:
   TOOLCHAIN_IS_GNU



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG
+	bool
+	select ARCH_TOOLCHAIN_GNU
+	default n
+
+choice
+	prompt "Toolchain Selection"
+	default TOOLCHAIN_GNU_EABI
+
+config TOOLCHAIN_IAR
+	bool "IAR ANSI C/C++ toolchain"
+	select CYGWIN_WINTOOL if WINDOWS_CYGWIN
+	select ARCH_TOOLCHAIN_IAR
+
+config TOOLCHAIN_BUILDROOT
+	bool "Buildroot (Cygwin or Linux)"
+	depends on !WINDOWS_NATIVE
+	select ARCH_TOOLCHAIN_GNU
+
+config TOOLCHAIN_GNU_EABI
+	bool "Generic GNU EABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any modern GNU toolchain (GCC 4.5 or newer)
+
+config TOOLCHAIN_GNU_OABI
+	bool "Generic GNU OABI toolchain"
+	select ARCH_TOOLCHAIN_GNU
+	---help---
+		This option should work for any GNU toolchain.
+
+config TOOLCHAIN_CLANG
+	bool "Generic Clang toolchain"
+	select ARCH_TOOLCHAIN_CLANG
+
+endchoice
+
+config TOOLCHAIN_BUILDROOT_OABI

Review Comment:
   merge to choice?



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_GNU
+	bool
+	default n
+
+config ARCH_TOOLCHAIN_CLANG

Review Comment:
   TOOLCHAIN_IS_CLANG



##########
arch/Kconfig.toolchain:
##########
@@ -0,0 +1,94 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config ARCH_TOOLCHAIN_IAR

Review Comment:
   remove check TOOLCHAIN_IAR instead?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org