Commits

doob committed 983295d

Fixed missing flags when linking.

  • Participants
  • Parent commits 28e6843

Comments (0)

Files changed (5)

 main
 dakefile
 dake.tmproj
-dake_files
+dake_files
+bin/dake-b

File dake/build/link.rb

 	class Link
 		def initialize (target, flags, object_files, needs_linking)
 			@target = target
-			@flags = flags.to_s
+			@flags = flags.flags.to_s
+			@link_flags = flags.link_flags.to_s
 			@object_files = object_files
 			@needs_linking = needs_linking
 		end

File dake/build/target.rb

 			@block.call(self) if has_block?
 			
 			pre_builds.each { |pre| pre.invoke }
-			
+
 			flag = Flag.new(@flags, @build_flags, @link_flags)			
 			build = Build.new(self, flag)
 			build.run
 			
 			if Options.separate_linking
 				pre_links.each { |link| link.invoke }
-				
-				link = Link.new(self, flag.link_flags, build.object_files, build.linking?)
+
+				link = Link.new(self, flag, build.object_files, build.linking?)
 				link.run
 				
 				post_links.each { |link| link.invoke }

File dake/managers/flag_manager.rb

 			@link_flags << flag if symbol == :link
 		end
 		
-		def remove_build_linkFlag (symbol, flag)
+		def remove_build_link_flag (symbol, flag)
 			@build_flags.delete(flag) if symbol == :build
 			@link_flags.delete(flag) if symbol == :link
 		end		

File dake/script/flag.rb

 			end
 			
 			def remove_build_link (symbol, flag)
-				Target.current.remove_build_linkFlag(symbol, flag)
+				Target.current.remove_build_link_flag(symbol, flag)
 			end
 		end
 		
 			link_flags = StringIO.new
 			
 			@link_flags.each_with_index do |flag, i|
-				i < @link_flags.length - 1 ? link_flags << "-L#{flag} " : flags << "-L#{flag}"
+				i < @link_flags.length - 1 ? link_flags << "-L#{flag} " : link_flags << "-L#{flag}"
 			end
 			
 			@link_flags_str = link_flags.string